Its value can be retrieved with Checkbox.value. CheckboxĪ Checkbox (or Flag) displays a checkbox that fires Checkbox.on_action() when toggled. Knob.relative # Knob value between 0.0-1.0. knob = Knob(default=0, limit=True, x=0, y=0, id=None) fault # Knob default value. With limit=True the value is constrained between 0-360 (i.e. The knob's value can be retrieved with Knob.value. KnobĪ Knob displays a twistable knob that fires Knob.on_action() when turned. Slider.steps # Number of steps from min to max. Slider.relative # Slider value between 0.0-1.0. The slider's value can be retrieved with Slider.value. SliderĪ Slider displays draws a draggable slider that will fire Slider.on_action() when dragged. button = Button(caption="", action=None, x=0, y=0, width=125, id=None) button.caption # Caption text. This function takes a Button as its only parameter. The action handler can be defined in a subclass, or given as a function. ButtonĪ Button displays a clickable button that will fire Button.on_action() when clicked. label = Label(caption, x=0, y=0, width=None, height=None, id=None) label.caption # Caption text. Optional parameters can include fill, font, fontsize, fontweight. ctrl.on_mouse_doubleclick(mouse) # Double-click event.Ī Label displays a text caption centered in the label's (width, height)-box. ctrl.reset() # Reverta to default settings. "slider_speed".Ĭtrl.height # Control height (read-only).Ĭtrl.enabled # True => receive events. Each type of control implements a range of layer events (usually Layer.on_mouse_release()) to elicit the correct behavior when the user clicks or drags the control. Since it inherits from Layer, it must be appended to the canvas (or another Control or Layout container) to receive events and get drawn. All of its properties are available in each type of control. The Control class is the base class from which all GUI controls inherit. Copy this folder and modify it to create a custom theme. The default theme is in nodebox/graphics/gui/theme/. A theme is loaded from a given folder path containing PNG images and TTF font files. Contributions in this area are welcome.Ī Theme defines the source artwork for controls, and font settings for labels. Due to time constraints we have yet to design a nice style of our own. The default visual style is loosely based on the iPhone GUI.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |