Navigation: ABC Library Reference > QueryListVisual > QueryListVisual Methods >====== Init (initialize the QueryListVisual object) ====== | |
Init, DERIVED PROC
The Init method initializes the QueryListVisual object. Init returns Level:Benign to indicate normal initialization.
The Init method “programs” the QueryListVisual object.
Implementation:
The QueryListClass.Ask method (indirectly) calls the Init method to configure the QueryListClass WINDOW.
The Init method reads each queryable item (defined by the QFC property) from a queue, then creates an edit-in-place, 3-column listbox with a field column, an equivalence operator (equal, not equal, greater than, etc.) column, and a value (to query for) column.
The Init method sets the coordinates for the QueryListClass WINDOW and for the individual controls.
Return Data Type: BYTE
Example:
QueryListClass.Ask PROCEDURE(BYTE UseLast)
W WINDOW('Query'),AT(,,300,200),FONT('MS SansSerif',8,,FONT:regular),SYSTEM,GRAY,DOUBLE
LIST,AT(5,5,290,174),USE(?List,FEQ:ListBox),|
FORMAT('91L|M~Field~@s20@44C|M~Operator~L@s10@120C|M~Value~L@s30@')
BUTTON('Insert'),AT(5,183,45,14),USE(?Insert,FEQ:Insert)
BUTTON('Change'),AT(52,183,45,14),USE(?Change,FEQ:Change)
BUTTON('Delete'),AT(99,183,45,14),USE(?Delete,FEQ:Delete)
BUTTON('&OK'),AT(203,183,45,14),USE(?Ok,FEQ:OK),DEFAULT
BUTTON('Cancel'),AT(250,183,45,14),USE(?Cancel,FEQ:Cancel)
END
CODE
OPEN(W)
IF ~UseLast THEN SELF.Reset().
RETURN CHOOSE(SELF.Win.Run()=RequestCancelled,Level:Benign,Level:Notify)
See Also: QFC