#include <vdkcomboentry.h>
VDKComboEntry::VDKComboEntry | ( | VDKForm * | owner, | |
char ** | selections = NULL | |||
) |
Constructor
owner | owner form | |
selections | a NULL terminating string array |
void VDKComboEntry::SetBackground | ( | VDKRgb | color, | |
GtkStateType | state | |||
) | [virtual] |
void VDKComboEntry::SetForeground | ( | VDKRgb | color, | |
GtkStateType | state | |||
) | [virtual] |
void VDKComboEntry::SetFont | ( | VDKFont * | f | ) | [virtual] |
Sets object font
Reimplemented from VDKObject.
VDKReadWriteValueProp<VDKComboEntry,bool> VDKComboEntry::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<VDKComboEntry,int> VDKComboEntry::Selected |
Sets/gets the index of the currently selected item in the dropdown list or -1 if no item is selected.
VDKReadWriteValueProp<VDKComboEntry,char*> VDKComboEntry::Text |
Set/Get the text in the Entry
VDKReadWriteValueProp<VDKComboEntry,StringList*> VDKComboEntry::Selections |
Sets/gets widget dropdown list.
VDKReadWriteValueProp<VDKComboEntry,GtkListStore*> VDKComboEntry::StoreModel |
gets underlying GtkListStore model that can be accessed in order to manipulate widget dropdown list if needed.
VDKReadWriteValueProp<VDKComboEntry,bool> VDKComboEntry::Sorted |
Sets underlying GtkListStore model as sortable. Once the model has been sorted, it can't go back to the default state. A possible work around to this problem is here:
bool SomeForm::ToggleSorting(VDKObject* sender) { static StringList *unsorted = NULL; GtkListStore* store = comboboxentry->StoreModel; // store unsorted dropdown list for later use if(!unsorted) unsorted = comboboxentry->Selections; if(chbox->Checked) comboboxentry->Sorted = true; else // since once sorted cannot revert to previous state // we substitute store model with a new unsorted one { comboboxentry->Sorted = false; GtkListStore* store = gtk_list_store_new (1, G_TYPE_STRING); comboboxentry->StoreModel = store; comboboxentry->Selections = unsorted; } comboboxentry->Selected = 0; return true; }
VDKReadWriteValueProp<VDKComboEntry,GtkSortType> VDKComboEntry::SortingOrder |
Sets/gets sorting order. Applicable only if Sorted property is true. can be either GTK_SORT_ASCENDING (default) or GTK_SORT_DESCENDING