vdk 2.4.0
|
Provides a simplified wrapper for gtkcombo. More...
#include <combo.h>
Provides a simplified wrapper for gtkcombo.
VDKCombo::VDKCombo | ( | VDKForm * | owner, |
char * | def = (char*) NULL , |
||
GtkWidget * | combo = NULL |
||
) |
Constructor
def | is an optional initial value to be shown in the Entrybox. |
combo | internal use, leave it as NULL. |
void VDKCombo::SetBackground | ( | VDKRgb | color, |
GtkStateType | state | ||
) | [virtual] |
VDKReadWriteValueProp<VDKCombo,bool> VDKCombo::CaseSensitive |
Default: false. Whether the Combo box should check for equality in the list case-sensitive or not.
VDKReadWriteValueProp<VDKCombo,bool> VDKCombo::Editable |
Same as Editable property in VDKEntry. Setting it to false allows you to provide a read-only list to select from, without the user being able to enter text.
VDKReadWriteValueProp<VDKCombo,bool> VDKCombo::Hidden |
Entry text visibility flag. (As in VDKEntry)
VDKReadWriteValueProp<VDKCombo,StringList> VDKCombo::PopdownStrings |
A StringList corresponding to the Text of the Listitems. Use this function to add items to the list,
StringList sl = mycombo->PopdownStrings; VDKString s("New line"); sl.add(s); mycombo->PopdownStrings = sl;
Since StringList is of type VDKValueList<VDKString> you can use all functions of VDKValueList to manipulate the list. It is very convenient to access the StringList by index:
int sel = mycombo->Selected; char *seltext = (sel == -1) ? "None" : (char*)(mycombo->GetPopdownStrings())[sel]; printf("Selected item is %s\n",seltext);
mycombo->PopdownStrings[sel];
((StringList)mycombo->PopdownStrings)[sel]
VDKReadOnlyValueProp<VDKCombo,int> VDKCombo::Selected |
Returns the index of the currently selected item in the dropdown list or -1 if no item is selected. See PopdownStrings for example usage.
VDKReadWriteValueProp<VDKCombo,bool> VDKCombo::Sorted |
Default: false. Setting Sorted to true will automatically sort the listitems alphabetically and maintain the list sorted whenever a new item is added
VDKReadWriteValueProp<VDKCombo,char*> VDKCombo::Text |
Set/Get the text in the Entry