@...LISTBOX \/ DEFINE LISTBOX

Creates a ListBox control

Standard Syntax (xBase Style):

 @ <nRow> ,<nCol>
 LISTBOX <ControlName>
 [ OF | PARENT <ParentWindowName> ]
 WIDTH <nWidth>
 HEIGHT <nHeight>
 [ ITEMS <acItems> ]
 [ VALUE <nValue> ]
 [ FONT <cFontName> SIZE <nFontSize> ]
 [ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
 [ TOOLTIP <cToolTipText> ]
 [ BACKCOLOR <aBackColor> ]
 [ FONTCOLOR <aFontColor> ]
 [ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
 [ ON CHANGE <OnChangeProcedure> | <bBlock> ]
 [ ON LOSTFOCUS <OnLostFocusProcedur> | <bBlock> ]
 [ ON DBLCLICK <OnDblClickProcedure> | bBlock> ]
 [ MULTISELECT ]
 [ HELPID <nHelpId> ]
 [ BREAK ]
 [ INVISIBLE ]
 [ NOTABSTOP ]
 [ SORT ]
 [ DRAGITEMS ]

Alternate Syntax:

DEFINE LISTBOX
   PARENT <ParentWindowName>
   ROW <nValue>
   COL <nValue>
   WIDTH <nWidth>
   HEIGHT <nHeight>
   ITEMS <acItems>
   VALUE <nValue>
   FONTNAME <cValue>
   FONTSIZE <nValue>
   FONTBOLD <lValue>
   FONTITALIC <lValue>
   FONTUNDERLINE <lValue>
   FONTSTRIKEOUT <lValue>
   TOOLTIP <cToolTipText>
   BACKCOLOR <aBackColor>
   FONTCOLOR <aFontColor>
   ONGOTFOCUS <OnGotFocusProcedure>
   ONCHANGE <OnChangeProcedure>
   ONLOSTFOCUS <OnLostFocusProcedure>
   ONDBLCLICK <OnDblClickProcedure>
   MULTISELECT <lValue>
   HELPID <nHelpId>
   BREAK <lValue>
   VISIBLE <lValue>
   TABSTOP <lValue>
   SORT <lValue>
   DRAGITEMS <lValue>
END LISTBOX

Properties:

D: Available at control definition only R: Read-Only

Events:

  • OnGotFocus
  • OnChange
  • OnLostFocus
  • OnDblClick

Methods:

  • Show
  • Hide
  • AddItem ( cItemText )
  • DeleteItem ( nItemIndex )
  • DeleteAllItems
  • SetFocus
  • Release

Hints:

  • 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.

results matching ""

    No results matching ""