Textual Option Gadgets
- Last UpdatedNov 01, 2022
- 1 minute read
The width of a textual option gadget, in grid units, must be specified. A tag name is optional and is displayed to the left of the gadget.
option .Colour 'Colour' width 10
The current value in a textual option gadget is scrollable using the left- and right-arrow keys. This means you can specify a gadget that’s narrower than the options displayed in the drop-down list.
The OPTION gadget actually contains two parallel lists of the same length, the display values (or Dtext ) and the replacement values (or Rtext). The list of display values must be supplied by assigning an array of values to the gadget's Dtext member. This is the list of choices displayed to you.
In Examples, the lines in the default constructor method define the Colour option gadget values as follows:
!ColourArray[1]='Black'
!ColourArray[2]='White'
!ColourArray[3]='Red'
!ColourArray[4]='Green'
!ColourArray[5]='Blue'
!This.Layout2.Colour.Dtext=!ColourArray
Other examples:
option .Colour 'Colour:' AT . . . callback '!!MyFunc()' width 20