@...COMBOBOXEX
DEFINE COMBOBOXEX 
Creates a extend ComboBox control.
  

Creates a extend ComboBox control.

SYNTAX

Standard Window:

@ <nRow> ,<nCol> COMBOBOXEX <ControlName>
[ OF | PARENT <
ParentWindowName> ]
[ ITEMS <
caItems> ]
[ ITEMSOURCE <
ItemSourceField> ]
[ VALUE <
nValue> ]
[ VALUESOURCE <
ValueSourceField> ]
[ DISPLAYEDIT ]
[ WIDTH <
nWidth> ]
[ HEIGHT <
nHeight> ]
[ LISTWIDTH <
nValue> ]
[ 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 ENTER <
OnEnterProcedure> | <bBlock> ]
[ ON DISPLAYCHANGE <
OnDisplayChangeProcedure> | <bBlock> ]
[ ON LISTDISPLAY <
OnListDisplayProcedure> | <bBlock> ]
[ ON LISTCLOSE <
OnListCloseProcedure> | <bBlock> ]
[ NOTABSTOP ]
[ HELPID <
nHelpId> ]
[ INVISIBLE ]
[ IMAGE <
aImage> ]
[ IMAGELIST <
ImageList> ]

SplitBox Window:

COMBOBOXEX <ControlName>
[ OF | PARENT <
ParentWindowName> ]
[ ITEMS <
caItems> ]
[ ITEMSOURCE <
ItemSourceField> ]
[ VALUE <
nValue> ]
[ VALUESOURCE <
ValueSourceField> ]
[ DISPLAYEDIT ]
[ WIDTH <
nWidth> ]
[ HEIGHT <
nHeight> ]
[ LISTWIDTH <
nValue> ]
[ 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 ENTER <
OnEnterProcedure> | <bBlock> ]
[ ON DISPLAYCHANGE <
OnDisplayChangeProcedure> | <bBlock> ]
[ ON LISTDISPLAY <
OnListDisplayProcedure> | <bBlock> ]
[ ON LISTCLOSE <
OnListCloseProcedure> | <bBlock> ]
[ NOTABSTOP ]
[ HELPID <
nHelpId> ]
[ GRIPPERTEXT <
cGripperText> ]
[ BREAK ]
[ INVISIBLE ]
[ IMAGE <
aImage> ]
[ IMAGELIST <
ImageList> ]

Alternate Syntax:

DEFINE COMBOBOX <Controlname>

[ ID <nId> ]
[ PARENT <
ParentWindowName> ]
COL <
nCol>
ROW <
nRow>
[ ITEMS <
caItems> ]
[ ITEMSOURCE <
ItemSourceField> ]
[ VALUE <
nValue> ]
[ VALUESOURCE <
ValueSourceField> ]
[ DISPLAYEDIT ]
[ WIDTH <
nWidth> ]
[ HEIGHT <
nHeight> ]
[ LISTWIDTH <
nValue> ]
[ 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> ]
[ ONENTER <
OnEnterProcedure> | <bBlock> ]
[ ONDISPLAYCHANGE <
OnDisplayChangeProcedure> | <bBlock> ]
[ ONLISTDISPLAY <
OnListDisplayProcedure> | <bBlock> ]
[ ONLISTCLOSE <
OnListCloseProcedure> | <bBlock> ]
[ NOTABSTOP < .T. | .F.> ]
[ HELPID <
nHelpId> ]
[ INVISIBLE < .T. | .F.> ]
[ IMAGE <
aImage> ]
[ IMAGELIST <
ImageList> ]

 END COMBOBOX

Remarks:

COMBOBOXEX accept, as <caImages>, character array with resources BITMAP (only!) items.
<caImages> can be one_dimmensional array {"pic1","pic2","pic3"} or
contains 2 elements array as one item i.e ("Pic1",{"Pic2","selPic2"},"pic3"} .

In first situation "pic1" will be used also as selected item picture,
in second situation "selPic2" will be used as picture for selected item.

COMBOBOXEX accepts ImageList defined with three bitmaps on one position also alternatively.IMAGE and IMAGELIST clauses can't be used simultaneously.

When COMBOBOXEX holds data from database (ITEMSOURCE set), then only
first element of <caImages> is used.

COMBOBOXEX do not have SORT clause (present in standard COMBOBOX)

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.


- IMAGE Property specify a character array containing image file names or
resource names.

When using the Additem or Item properties you must use a single array
containing two elements. The first, the image index item and the second, the text for the item.

When 'Image' and 'ITEMSOURCE' properties are used simultaneously, 'ITEMSOURCE' must be specified as a list containing two field names.
The first, the image index for the items, the second, the item text.



DESCRIPTION:
nRow, nCol
Position in the area of ??the window in pixels.
nWidth, nHeight
The desired size of the ComboBoxEx Control in pixels.
nId
The ID identifier this Control in Dialog Window
ControlName
A reference to the ComboBoxEx Control
ParentWindowName
A reference to the Parent Window.
nHelpId
The help topic identifier for this Control
caItems
Specifies the items list
ItemSourceField
Specifies the item source either a Field or an Array
(See remarks above for more detail)
nValue
 
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 on GotFocus
OnChangeProcedure
An action to be performed on Change
OnLostFocusProcedure
An action to be performed on LostFocus
OnEnterProcedure
An action to be performed on Enter
OnDisplayChangeProcedure
An action to be performed on Display Change
OnListDisplayProcedure         
An action to be performed on List Display
OnListCloseProcedure            
An action to be performed on List Close
cGripperText  
Specifies the GripperText
 
 
DISPLAYEDIT           
Specifies that we can type a value in the ComboBox
UPPERCASE
Specifies whether character will be automatically converted to uppercase
LOWERCASE           
Specifies whether character will be automatically converted to lowercase
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 ComboBoxEx in alphabetical order


PROPERTIES:

·   Value
Set / Gets ComboBoxEx value.
·   Enabled
Set / Gets enabled state of a ComboBoxEx control
·   Visible          
Set / Gets visible a ComboBoxEx control.
·   Item ( nItemIndex )
Set / Gets item text in a ComboBoxEx
·   ItemCount (R)
Get item count in a ComboBoxEx
·   ItemHeight
Set / Gets item height of a ComboBoxEx control.
·   Row
Set / Gets row position of a ComboBoxEx control.
·   Col   
Set / Gets column position of a ComboBoxEx control.
·   Width
Set / Gets width of a ComboBoxEx control.
·   Height
Set / Gets height of a ComboBoxEx control.
·   ListWidth
Set / Gets list width of dropdown list.
·   FontName
Set / Gets ComboBoxEx control's font name.
·   FontSize
Set / Gets ComboBoxEx control's font size.
·   FontBold
Set / Gets ComboBoxEx control's font bold property
·   FontItalic
Set / Gets ComboBoxEx control's font italic property
Set / Gets ComboBoxEx control's font underline property
Set / Gets ComboBoxEx control's font strikeout property
·   ToolTip
Set / Gets ComboBoxEx control's tooltip text.
·   DisplayValue
Set / Gets value of a GUI object
·   Cargo
Set / Gets user property 'Cargo' for ComboBoxEx control
·   Name (R)
Retrieves the name of a ComboBoxEx 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
·   ItemSource(D)
Filled the ComboBoxEx with the content of a table field.
·   DisplayEdit(D)
Allows user to edit selected item text in 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:

·   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 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
Action to be performed when losing the focus.
·   OnEnter
Action to be performed when pressing a Enter key

METHODS:

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

FUNCTIONS:

·     _IsComboExtend ( ControlName , ParentForm ) => lValue
Return logical value .T. if <
ControlName> is an COMBOBOXEX, .F. otherwise.
! If <ControlName> is not ComboBox or COMBOBOXEX - error will be generated.
·     _GetComboItemValue( ControlName, ParentForm, nItemIndex) => cString
Return combo item string coresponding to nItemIndex value


EXAMPLE:

See demos in :
\Samples\Basic\ComboEx
\samples\basic\ComboEx_2