|
OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Combo boxes need to transfer several pieces of information (strings, item data, selected item, and the index of the selected item).
The transfer buffer for combo boxes is a class called TComboBoxData. TComboBoxData has the following data members to hold the combo box information:
| Data member | Type | Description |
| TComboBoxData::ItemDatas | TUint32Array* | Contains the item data uint32 for each item in the list box. |
| TComboBoxData::Selection | char* | Contains the selected string. |
| TComboBoxData::Strings | TStringArray* | Contains all the strings in the list box. |
TComboBoxData also uses the following member functions to manipulate the combo box information:
| Member function | Description |
| TComboBoxData::AddString | Adds a string to the Strings array, and optionally selects it. |
| TComboBoxData::AddStringItem | Adds a string to the Strings array, optionally selects it, and |
item data to the ItemDatas array.
TComboBoxData::Clear
Clears all data.
TComboBoxData::GetItemDatas
Returns a reference to ItemDatas.
TComboBoxData::GetSelCount
Returns the number of selected items.
TComboBoxData::GetSelection
Returns a reference to the current selection.
TComboBoxData::GetSelIndex
Returns the index of the current selection.
TComboBoxData::GetSelString
Places a copy of the current selection into a character buffer.
TComboBoxData::GetSelStringLength
Returns the length of the currently selected string.
TComboBoxData::GetStrings
Returns a reference to the entire array of strings in the combo box.
TComboBoxData::ResetSelections
Sets the current selection to a null string and sets the index to CB_ERR.
TComboBoxData::Select
Sets a string in Strings to be the current selection, based on an index parameter.
TComboBoxData::SelectString
Sets a string in Strings to be the current selection, based on matching a const char far* parameter.