@...COMBOBOX DEFINE COMBOBOX Creates a ComboBox control.
|
A ComboBox is a unique type of control, that combines much of the functionality of a list box and an edit control.
SYNTAX
Standard Window:
@ <nRow> ,<nCol> COMBOBOX <ControlName>
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ WIDTH <nWodth> ]
[ HEIGHT <nHeight>]
[ ITEMS <caItems> ]
[ ITEMSOURCE <ItemSourceField> ]
[ VALUE <nValue> ]
[ VALUESOURCE <ValueSourceField> ]
[ DISPLAYEDIT ]
[ LISTWIDTH | DROPPEDWIDTH <nValue> ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ UPPERCASE ]
[ LOWERCASE ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ ON DISPLAYCHANGE <OnDisplayChangeProcedure> | <bBlock> ]
[ ON LISTDISPLAY | ON DROPPDOWN <OnListDisplayProcedure> | <bBlock> ]
[ ON LISTCLOSE | ON CLOSEUP <OnListCloseProcedure> | <bBlock> ]
[ NOTABSTOP ]
[ HELPID <nHelpId> ]
[ INVISIBLE ]
[ SORT ]
Dialog Window:
REDEFINE COMBOBOX <ControlName>
ID <nId>
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ ITEMS <caItems> ]
[ ITEMSOURCE <ItemSourceField> ]
[ VALUE <nValue> ]
[ VALUESOURCE <ValueSourceField> ]
[ DISPLAYEDIT ]
[ LISTWIDTH <nValue> ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ UPPERCASE ]
[ LOWERCASE ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ ON DISPLAYCHANGE <OnDisplayChangeProcedure> | <bBlock> ]
[ ON LISTDISPLAY <OnListDisplayProcedure> | <bBlock> ]
[ ON LISTCLOSE <OnListCloseProcedure> | <bBlock> ]
[ NOTABSTOP ]
[ HELPID <nHelpId> ]
[ INVISIBLE ]
[ SORT ]
SPLITBOX VERSION
COMBOBOX <ControlName>
[ OF | PARENT <ParentWindowName> ]
[ WIDTH <nWodth> ]
[ HEIGHT <nHeight>]
[ ITEMS <caItems> ]
[ ITEMSOURCE <ItemSourceField> ]
[ VALUE <nValue> ]
[ VALUESOURCE <ValueSourceField> ]
[ DISPLAYEDIT ]
[ LISTWIDTH <nValue> ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ UPPERCASE ]
[ LOWERCASE ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ ON DISPLAYCHANGE <OnDisplayChangeProcedure> | <bBlock> ]
[ ON LISTDISPLAY <OnListDisplayProcedure> | <bBlock> ]
[ ON LISTCLOSE <OnListCloseProcedure> | <bBlock> ]
[ NOTABSTOP ]
[ HELPID <nHelpId> ]
[ GRIPPERTEXT <cGripperText> ]
[ BREAK ]
[ INVISIBLE ]
[ SORT ]
COMBOBOX <ControlName>
[ OF | PARENT <ParentWindowName> ]
[ WIDTH <nWodth> ]
[ HEIGHT <nHeight>]
[ ITEMS <caItems> ]
[ ITEMSOURCE <ItemSourceField> ]
[ VALUE <nValue> ]
[ VALUESOURCE <ValueSourceField> ]
[ DISPLAYEDIT ]
[ DROPPEDWIDTH <nValue> ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ UPPERCASE ]
[ LOWERCASE ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ ON GOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ ON DISPLAYCHANGE <OnDisplayChangeProcedure> | <bBlock> ]
[ ON DROPDOWN <OnDropDownProcedure> | <bBlock> ]
[ ON CLOSEUP <OnCloseUpProcedure> | <bBlock> ]
[ NOTABSTOP ]
[ HELPID <nHelpId> ]
[ GRIPPERTEXT <cGripperText> ]
[ BREAK ]
[ INVISIBLE ]
[ SORT ]
Alternate Syntax:
DEFINE COMBOBOX <Controlname>
[ ID <nId> ]
[ PARENT <ParentWindowName> ]
COL <nCol>
ROW <nRow>
[ WIDTH <nWodth> ]
[ HEIGHT <nHeight>]
[ ITEMS <caItems> ]
[ ITEMSOURCE <ItemSourceField> ]
[ VALUE <nValue> ]
[ VALUESOURCE <ValueSourceField> ]
[ DISPLAYEDIT < .T. | .F.> ]
[ LISTWIDTH <nValue> ]
[ FONTNAME <cFontname>
[ FONTSIZE <nFontsize> ]
[ FONTBOLD < .T. | .F.> ]
[ FONTITALIC < .T. | .F.> ]
[ FONTUNDERLINE < .T. | .F.> ]
[ FONTSTRIKEOUT < .T. | .F.> ]
[ UPPERCASE < .T. | .F.> ]
[ LOWERCASE < .T. | .F.> ]
[[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <aBackColor> ]
[ FONTCOLOR <aFontColor> ]
[ ONGOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ONCHANGE <OnChangeProcedure> | <bBlock> ]
[ ONLOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ONENTER <OnEnterProcedure> | <bBlock> ]
[ ONDISPLAYCHANGE <OnDisplayChangeProcedure> | <bBlock> ]
[ ONLISTDISPLAY <OnListDisplayProcedure> | <bBlock> ]
[ ONLISTCLOSE <OnListCloseProcedure> | <bBlock> ]
[ NOTABSTOP < .T. | .F.> ]
[ HELPID <nHelpId> ]
[ INVISIBLE < .T. | .F.> ]
[ SORT < .T. | .F.> ]
END COMBOBOX
Remarks:
In a ComboBox the 'Height' clause refers to the total height (considering extended list height)
When used in control definition, ITEM property must be a character array.
When ITEMSOURCE property is set to a fieldname, 'Value' property
uses the physical record number, as in browse.
If you set the VALUESOURCE property to a fieldname, its content is
returned instead the physical record number.
nRow, nCol
|
Position in the area of ??the window in pixels.
|
nWidth, nHeigth
|
The desired size of the ComboBox Control in pixels.
|
nId
|
The ID identifier this Control in Dialog Window
|
ControlName
|
A reference to the CmboBox Control
|
ParentWindowName
|
A reference to the Parent Window.
|
nHelpId
|
The help topic identifier for this Control
|
PROPERTIES:
Set / Gets ComboBox value.
| |
Set / Gets enabled state of a ComboBox control
| |
Set / Gets visible a ComboBox control.
| |
Set / Gets item text in a ComboBox
| |
Get item count in a ComboBox
| |
Set / Gets row position of a ComboBox control.
| |
Set / Gets column position of a ComboBox control.
| |
Set / Gets width of a ComboBox control.
| |
Set / Gets height of a ComboBox control.
| |
Set / Gets ComboBox control's font name.
| |
Set / Gets ComboBox control's font size.
| |
Set / Gets ComboBox control's font bold property
| |
Set / Gets ComboBox control's font italic property
| |
Set / Gets ComboBox control's font underline property
| |
Set / Gets ComboBox control's font strikeout property
| |
Set / Gets ComboBox control's tooltip text.
| |
Set / Gets user property 'Cargo' for ComboBox control
| |
Retrieves the name of a ComboBox control.
| |
·
Parent (D)
|
Set the name as character identifier of the parent window.
|
Set the numeric help topic identifier of the control.
| |
· UpperCase (D)
|
Transforms all characters to uppercase
|
·
LowerCase (D)
|
Transforms all characters to lowercase
|
·
NoTabStop (D)
|
Sets whether an element behavior can't receive focus and participate in
the tabbing sequence
|
·
ItemSource (D)
|
Filled the ComboBox with the content of a table field.
|
·
Sort (D)
|
Set the SORT style of a ComboBox control
|
·
DisplayEdit (D)
|
Allows user to edit selected item text in display area.
|
Gets value - formated characters string from display area.
| |
·
Break (D)
|
Control passes to the statement that follows the terminated statement.
|
·
GripperText (D)
|
Set the caption for the gripping
|
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
| |
Action to be performed when changing of display the control
| |
Action to be performed when closed of display the control
| |
Action to be performed when closed of list the control
| |
An action to be performed when losing the focus.
| |
Action to be performed when pressing a Enter key
|
METHODS:
Shows a ComboBox control
| |
Hides a ComboBox control
| |
Add a new item to a ComboBox control
| |
Deletes an item from a ComboBox control
| |
Deletes all items from a ComboBox control
| |
Gives the focus to a ComboBox control
| |
Releases a ComboBox control from memory
| |
Update enables for ComboBox control
| |
Update disables for ComboBox control
| |
Save a
ComboBox control as BitMap file.
|
EXAMPLE: