Skip to content

Properties

nicolaspayette edited this page Dec 5, 2014 · 21 revisions

Color, Commands, Enabled?, Font-color, Font-size, Height, Hidden?, Increment, Items, Key, Kind, Label, Maximum, Minimum, Opaque?, Order, Selected-item, Selected-items, Selected?, Tab, Text, Title, Units, Value, Width, X, Y


Color

The background color of the widget.

For widgets with the Opaque? property, xw:opaque? need to be true for the background color to be apparent.

Getter Setter Type Applies To
xw:color xw:set-color Color Tab, Button, Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.

Commands

The commands to be run when a button is clicked.

Those commands are provided as a string that is not pre-compiled: if there are errors in the command, you will only find out at runtime. (This is similar to using run with a string).

Getter Setter Type Applies To
xw:commands xw:set-commands String Button.

Enabled?

A widget that is enabled allows user to change the value(s) entered in the widget. A widget that is disabled... doesn't. A disabled widget still appears on the screen, but it is grayed out and cannot be changed until it is enabled again.

For a Note, with which no user interaction is possible anyway, disabling it only makes it appear grayed out.

Note that calling xw:set-enabled? false on a Tab will make all the widgets on that tab appear disabled without affecting their Enabled? property. This way, if you later re-enable the tab, you will get the same mixture of enabled/disabled widgets that you had before disabling the tab. If you do want to individually disable all the widgets on a tab, you can do: xw:ask xw:widgets xw:with [ xw:tab = "my-tab" ] [ xw:set-enabled? false ].

Getter Setter Type Applies To
xw:enabled? xw:set-enabled? Boolean Tab, Button, Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.

Font-color

Getter Setter Type Applies To
xw:font-color xw:set-font-color Color Button, Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.

Font-size

Getter Setter Type Applies To
xw:font-size xw:set-font-size Number Button, Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.

Height

Getter Setter Type Applies To
xw:height xw:set-height Number Button, Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.

Hidden?

Getter Setter Type Applies To
xw:hidden? xw:set-hidden? Boolean Button, Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.

Increment

Getter Setter Type Applies To
xw:increment xw:set-increment Number Slider.

Items

Getter Setter Type Applies To
xw:items xw:set-items List Chooser, Multi-Chooser.

Key

Getter Setter Type Applies To
xw:key None String Tab, Button, Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.

Kind

Getter Setter Type Applies To
xw:kind None String Tab, Button, Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.

Label

Getter Setter Type Applies To
xw:label xw:set-label String Button, Checkbox, Chooser, Multi-Chooser, Numeric Input, Slider, Text-Input.

Maximum

Getter Setter Type Applies To
xw:maximum xw:set-maximum Number Slider.

Minimum

Getter Setter Type Applies To
xw:minimum xw:set-minimum Number Slider.

Opaque?

Getter Setter Type Applies To
xw:opaque? xw:set-opaque? Boolean Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.

Order

Getter Setter Type Applies To
xw:order xw:set-order Number Tab.

Selected-item

Getter Setter Type Applies To
xw:selected-item xw:set-selected-item Any Chooser.

Selected-items

Getter Setter Type Applies To
xw:selected-items xw:set-selected-items List Multi-Chooser.

Selected?

Getter Setter Type Applies To
xw:selected? xw:set-selected? Boolean Checkbox.

Tab

Getter Setter Type Applies To
xw:tab xw:set-tab String Button, Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.

Text

Getter Setter Type Applies To
xw:text xw:set-text String Note, Text-Input.

Title

Getter Setter Type Applies To
xw:title xw:set-title String Tab.

Units

Getter Setter Type Applies To
xw:units xw:set-units Number Slider.

Value

Getter Setter Type Applies To
xw:value xw:set-value Number Numeric Input, Slider.

Width

Getter Setter Type Applies To
xw:width xw:set-width Number Button, Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.

X

Getter Setter Type Applies To
xw:x xw:set-x Number Button, Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.

Y

Getter Setter Type Applies To
xw:y xw:set-y Number Button, Checkbox, Chooser, Multi-Chooser, Note, Numeric Input, Slider, Text-Input.
Clone this wiki locally