@...LISTBOX DEFINE LISTBOX
|
Creates a listbox control.
SYNTAX
Standard Window:
@ <nRow> ,<nCol> LISTBOX <ControlName>
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ WIDTH <nWidth> ]
[ HEIGHT <nHeight> ]
[ ITEMS <acItems> ]
[ VALUE <anValue> ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON DBLCLICK <OnDblClickProcedure> | bBlock> ]
[ MULTISELECT ]
[ DRAGITEMS ]
[ HELPID <nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ SORT ]
Dialog Window:
REDEFINE LISTBOX <ControlName>
ID <nId>
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ ITEMS <acItems> ]
[ VALUE <anValue> ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON DBLCLICK <OnDblClickProcedure> | bBlock> ]
[ MULTISELECT ]
[ DRAGITEMS ]
[ HELPID <nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ SORT ]
SPLITBOX VERSION
LISTBOX
<ControlName>
[ OF | PARENT <ParentWindowName> ]
[ WIDTH <nWidth> ]
[ HEIGHT <nHeight> ]
[ ITEMS <acItems> ]
[ VALUE <anValue> ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON DBLCLICK <OnDblClickProcedure> | bBlock> ]
[ MULTISELECT ]
[ DRAGITEMS ]
[ HELPID <nHelpId> ]
[ BREAK ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ SORT ]
Alternate Syntax:
DEFINE LISTBOX
[ ID <nId> ]
[ PARENT <ParentWindowName> ]
COL <nCol>
ROW <nRow>
[ WIDTH <nWidth> ]
[ HEIGHT <nHeight> ]
[ ITEMS <acItems> ]
[ VALUE <anValue> ]
[ FONTNAME <cFontname>
[ FONTSIZE <nFontsize> ]
[ FONTBOLD < .T. | .F.> ]
[ FONTITALIC < .T. | .F.> ]
[ FONTUNDERLINE < .T. | .F.> ]
[ FONTSTRIKEOUT < .T. | .F.> ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ ONGOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ONCHANGE <OnChangeProcedure> | <bBlock> ]
[ ONLOSTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ONDBLCLICK <OnDblClickProcedure> | bBlock> ]
[ MULTISELECT < .T. | .F.> ]
[ DRAGITEMS < .T. | .F.> ]
[ HELPID <nHelpId> ]
[ INVISIBLE < .T. | .F.> ]
[ NOTABSTOP < .T. | .F.> ]
[ SORT < .T. | .F.> ]
END LISTBOX
Remarks
If MULTISELECT clause is used VALUE must be a numeric array, containing the index position of selected items.
When used in control definition, ITEM property must be a character array.
PROPERTIES:
Set / Gets ListBox value.
| |
Set / Gets enabled state of a ListBox control
| |
Set / Gets visible a ListBox control.
| |
Set / Gets item text in a ListBox
| |
Get item count in a ListBox
| |
Set / Gets row position of a ListBox control.
| |
Set / Gets column position of a ListBox control.
| |
Set / Gets width of a ListBox control.
| |
Set / Gets height of a ListBox control.
| |
Set / Gets ListBox control's font name.
| |
Set / Gets ListBox control's font size.
| |
Set / Gets ListBox control's font bold property
| |
Set / Gets ListBox control's font italic property
| |
Set / Gets ListBox control's font underline property
| |
Set / Gets ListBox control's font strikeout property
| |
Set / Gets the foreground color for text within the ListBox
| |
Set / Gets the background color for text within the ListBox
| |
Set / Gets ListBox control's tooltip text.
| |
Set / Gets user property 'Cargo' for ListBox control
| |
Retrieves the name of a ListBox control.
| |
· Parent (D)
|
Set the name as character identifier of the parent window.
|
Set the numeric help topic identifier of the control.
| |
· NoTabStop (D)
|
Sets whether an element behavior can't receive focus and participate
in the tabbing sequence
|
· MultiSelect (D)
|
Sets a value indicating whether multiple items can be selected
|
· DragItems (D)
|
Specifies whether the items in a ListBox can be arranged by the user.
|
· Sort (D)
|
Sets to automatically sort strings alphabetically in a ListBox
|
· Break (D)
|
Control passes to the statement that follows the terminated statement.
|
D: Available
at control definition only
R: Read-Only
EVENTS:
An action to be performed when getting the focus
| |
An action to be performed when generic changing of the control
| |
An action to be performed when losing the focus.
| |
An action to be performed when Double Left clicking.
|
METHODS:
Shows a ListBox control
| |
Hides a ListBox control
| |
Add a new item to a ListBox control
| |
Deletes an item from a ListBox control
| |
Deletes all items from a ListBox control
| |
Gives the focus to a ListBox control
| |
Releases a ListBox control from memory
| |
Save a
ListBox control as BitMap file.
|
EXAMPLE: