
#NODEBOX GUI FULL#
DockĪ Dock panel is attached to the edge of the canvas ( LEFT or RIGHT), extending the full height. panel.pack(padding=20) # Make panel as small as possible. Panel.append(control) panel.open() # Shows the panel. panel = Panel(caption="", fixed=False, modal=True, x=0, y=0, width=175, height=250) panel.caption # Caption text. If the control is added directly (instead of in a Layout), its (x,y)-position needs to be set manually to create an orderly layout. A control or Layout group can be added with Panel.append(). It can be dragged when Panel.fixed=False. To add new lines and tabs in the field, use optional parameter reserved= (list of reserved keys).Ī Panel acts as a container for other controls. By default, ENTER and TAB keys are reserved. field = Field(value="", hint="", action=None, x=0, y=0, width=125, padding=5, id=None) fault # Default string value.įlection # A tuple of (i,j)-values.įlected # True => text is selected.Ī multi-line field can be created with optional parameters wrap=True and height (field height in pixels). Optional parameters can include fill, font, fontsize, fontweight. The string value can be retrieved with Field.value. Text in the field can be modified and selected. checkbox = Checkbox(default=False, x=0, y=0, id=None) fault # Checkbox default value.Ĭheckbox.value # Checkbox current value (True | False) FieldĪ Field displays a single-line text input field that will fire Field.on_action() when ENTER is pressed. 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.

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.

Panel = Panel("Example", width=200, height=200)
