@...CHECKLISTBOX
DEFINE LISTBOX 
Create a CheckListBox control
  

Creates a checklistbox control.

SYNTAX

Standard Window:

@ <nRow> ,<nCol> CHECKLISTBOX <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 <
anBackColor> ]
[ FONTCOLOR <
anFontColor> ]
[ ON GOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON DBLCLICK <
OnDblClickProcedure> | bBlock> ]
[ MULTISELECT ]
[ CHECKBOXITEM <
aCheck> ]
[ ITEMHEIGHT <
nItemHeight> ]
[ HELPID <
nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ SORT ]

Dialog Window:

REDEFINE CHECKLISTBOX <ControlName>
ID <
nId>
[ OF | PARENT | DIALOG <
ParentWindowName> ]
[ ITEMS <
acItems> ]
[ VALUE <
anValue> ]
[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText> ]
[ BACKCOLOR <
anBackColor> ]
[ FONTCOLOR <
anFontColor> ]
[ ON GOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON DBLCLICK <
OnDblClickProcedure> | bBlock> ]
[ MULTISELECT ]
[ HELPID <
nHelpId> ]
[ CHECKBOXITEM <
aCheck> ]
[ ITEMHEIGHT <
nItemHeight> ];
[ INVISIBLE ]
[ NOTABSTOP ]
[ SORT ]

SPLITBOX VERSION

CHECKLISTBOX <ControlName>
[ OF | PARENT <
ParentWindowName> ]
[ WIDTH <
nWidth> ]
[ HEIGHT <
nHeight> ]
[ ITEMS <
acItems> ]
[ VALUE <
anValue> ]
[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText> ]
[ BACKCOLOR <
anBackColor> ]
[ FONTCOLOR <
anFontColor> ]
[ ON GOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON DBLCLICK <
OnDblClickProcedure> | bBlock> ]
[ MULTISELECT ]
HELPID <
nHelpId> ]
[ CHECKBOXITEM <
aCheck> ]
[ ITEMHEIGHT <
nItemHeight> ]
[ BREAK ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ SORT ]

Alternate Syntax:

DEFINE CHECKLISTBOX

[ 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 <
anBackColor> ]
[ FONTCOLOR <
anFontColor> ]
[ ONGOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ONCHANGE <
OnChangeProcedure> | <bBlock> ]
[ ONLOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ONDBLCLICK <
OnDblClickProcedure> | bBlock> ]
[ MULTISELECT < .T. | .F.> ]
[
CHECKBOXITEM <aCheck> ]
[ ITEMHEIGHT <
nItemHeight> ]
[ HELPID <
nHelpId> ]
[ INVISIBLE < .T. | .F.> ]
[ NOTABSTOP < .T. | .F.> ]
[ SORT < .T. | .F.> ]

END CHECKLISTBOX

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 or  two-dimensional array (character and logical) to the definition of both Item and check


DESCRIPTION:
nRow, nCol
Position in the area of ??the window in pixels.
nWidth, nHeight
The desired size of the CheckListBox Control in pixels.
nId
The ID identifier this Control in Dialog Window
ControlName
A reference to the CheckListBox Control
ParentWindowName
A reference to the Parent Window.
nHelpId
The help topic identifier for this Control
acItems
Specifies an array of String items for the CheckListBox control
anValue
Specifies the Position to start within the items list
cFontName
Specifies the Font Name
nFontSize
Specifies the Font Size
cToolTipText
Specifies the Text for the ToolTip
anBackColor
Specifies the Background Color
anFontColor
Specifies the Font Color
OnGotFocusProcedure
An action to be performed when CheckListBox Got Focused.
OnChangeProcedure
An action to be performed when CheckListBox has changed
OnLostFocusProcedure
An action to be performed when CheckListBox Lost Focused.
OnDblClickProcedure
An action to be performed when CheckListBox is Double Clicked
aCheck
?
nItemHeight
?
 
 
MULTISELECT
Specifies if was select multiple items from the ListBox control
NOTABSTOP
Stop the control to receive focus and participate in the tabbing sequence
INVISIBLE
The visibility property specifies whether or not a control is visible
SORT
Sort the items list in the CheckListBox in alphabetical order

.

PROPERTIES:

·   Value
Set / Gets CheckListBox value
·   Enabled
Set / Gets enabled state of a CheckListBox control
·   Visible          
Set / Gets visible a CheckListBox control.
·   Item ( nItemIndex )
Set / Gets item text in a CheckListBox control
·   ItemCount (R)
Get item count in a CheckListBox control
·   Row
Set / Gets row position of a CheckListBox control.
·   Col   
Set / Gets column position of a CheckListBox control.
·   Width
Set / Gets width of a CheckListBox control.
·   Height
Set / Gets height of a CheckListBox control.
·   FontName
Set / Gets CheckListBox control's font name.
·   FontSize
Set / Gets CheckListBox control's font size.
·   FontBold
Set / Gets CheckListBox control's font bold property
·   FontItalic
Set / Gets CheckListBox control's font italic property
Set / Gets CheckListBox control's font underline property
Set / Gets CheckListBox control's font strikeout property
·   FontColor
Set / Gets the foreground color for text within the CheckListBox
·   BackColor
Set / Gets the background color for text within the CheckListBox
·   ToolTip
Set / Gets CheckListBox control's tooltip text.
·   Cargo
Set / Gets user property 'Cargo' for CheckListBox control
·   Name (R)
Retrieves the name of a CheckListBox control.
·   Parent(D)
Set the name as character identifier of the parent window.
·   HelpId (D)
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
·   Sort(D)
Sets to automatically sort strings alphabetically in a CheckListBox
·   Break(D)
Control passes to the statement that follows the terminated statement.
Set / Gets user property 'CheckBoxItem' for CheckListBox control

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

EVENTS:

·   OnGotFocus
Action to be performed when getting the focus
·   OnChange
Action to be performed when generic changing of the control
Action to be performed when losing the focus.
·   OnDblClick
Action to be performed when Double Left clicking.

METHODS:

·   Show
Shows a ListBox control
·   Hide
Hides a ListBox control
·   AddItem( cItemText )
Add a new item to a ListBox control
·   DeleteItem( nItemIndex )
Deletes an item from a ListBox control
Deletes all items from a ListBox control
·   SetFocus
Gives the focus to a ListBox control
·   Release
Releases a ListBox control from memory
·   SaveAs
Save a ListBox control as BitMap file.

EXAMPLE:

See demos in :
\Samples\Basic\CheckListBox