SELECTOR Gadget
- Last UpdatedNov 07, 2024
- 3 minute read
Members
|
Name |
Type |
Purpose |
|---|---|---|
|
Add(STRING Dtext) |
NO RESULT |
Append an entry to the list, where Dtext is the text to display in the option list. |
|
Add(STRING Dtext, STRING Rtext)) |
NO RESULT |
Append and entry to the list, where Dtext is the text to display in the option list, and Rtext is the replacement text for the new field. If Rtext is not specified, it will be set to Dtext by default. |
|
Val |
REAL |
Selected field number of a single choice list. (1,2,¼) |
|
Val |
ARRAY OF REAL |
Selected field numbers of a multiple choice list. (1,2,¼) |
|
DText |
STRING ARRAY |
Set or get the entire list of display texts. |
|
DText[n] |
STRING |
Get the display text of the n'th field. |
|
PickedField |
REAL |
Last picked list field number. |
Methods
|
Name |
Result |
Purpose |
|---|---|---|
|
FullName() |
STRING |
Get the full gadget name, for example, '!!Form.gadget'. |
|
Name() |
STRING |
Get the gadget's name, for example, 'gadget'. |
|
Owner() |
FORM |
Get the owning form. |
|
Shown() |
BOOLEAN |
Get ‘shown’ status. |
|
Type() |
STRING |
Get the GADGET type as a string. |
|
Select(STRING text, STRING value) |
NO RESULT |
Select specified item in a selector. text must be ‘Rtext’ or ‘Dtext’. value is the field RTEXT or DTEXT to be selected. |
|
Select(STRING text, Array values) |
NO RESULT |
Select multiple choice selector fields by value: text must be ‘Rtext’ or ‘Dtext’. The values array contains the RTEXT or DTEXT of the fields to be selected. |
|
Selection(STRING text) |
STRING ARRAY OF STRING |
Get current selection: text must be ‘Rtext’ or ‘Dtext’. The value of Selection is the RTEXT or DTEXT of the selected field or fields. |
|
SetPopup(MENU) |
NO RESULT |
Links the given menu with the gadget as a pop-up. |
|
SetFocus() |
NO RESULT |
Move keyboard focus to this gadget. |
|
SetToolTip(STRING) |
NO RESULT |
Sets or edits the text of the TOOLTIP. |
|
Refresh() |
NO RESULT |
Refreshes the display of the gadget. |
|
RemovePopup(MENU) |
NO RESULT |
Removes the given pop-up menu from the gadget. |
|
GetPickedPopup() |
MENU |
Returns the last picked pop-up menu for the gadget. |
|
Clear() |
NO RESULT |
Clear selector contents. |
|
Clear |
NO RESULT |
Clear selections only. |
|
Background() |
STRING |
Get Background Color Name. Some gadgets do not support this property in all circumstances, for example, gadgets which are showing a pixmap. Gadgets whose color has not been set explicitly, may not have a color with a known colorname. In this case an error is raised. |
Command
The SELECTOR command defines a database element selector gadget and specifies its position, tag, and callback text. Also specifies whether the selector allows a single choice only or multiple choices and defines the area (width and height) in which the displayed part of the list will appear. It also allows you to specify which parts of the hierarchy are shown and whether or not these are updated automatically during database navigation.
.-------<---------.
/ |
>- SELector gname -+-- <fgpos> --------|
+-- tagtext --------|
+-- <fganch> -------|
+-- TOOLTIP text ---|
+-- CALLback text --*
+-- SINGle -.
+-----------‘- <vshap> DATAbase -+- MEMbers -.
| +- OWNers --|
| ‘-----------+-AUTO-.
| ‘------|
‘- MULTiple <vshap> DATAbase ---+- MEMbers ---------|
|- OWNers ----------|
‘-------------------|
|
.--------<-----------*
|
+-- TOOLTIP text --.
‘------------------‘->
|
Default: |
Single choice. If DATABASE is not qualified, default is Members plus Owners. Auto update off. |