The Qt documentation in C++ of this class can be read here: http://doc.trolltech.com/4.3/qcombobox.html
A control for the form object, is a combined button and popup list.
A combobox is a selection control which displays the current item and can pop up a list of items. Comboboxes provide a means of showing the user’s current choice out of a list of options in a way that takes up the minimum amount of screen space.
Whenever you use Index, KBasic checks if Index is greater equal 1 and smaller equal Length(). If not, the command will not be executed, e.g. You use Insert(10, “test”), but there are only 4 elements yet, the Insert will fail. First element has got Index = 1.
Most important
Please read the control class overview Control as well.
Function Length() As Integer
Function Find(Caption As String) As Integer
Searches all items and return the index.
The first entry has got index = 1.
Returns 0 if item could not be found.
The search is case-sensitive means that it must exactly match the search string.
Sub HidePopUp()
Sub ShowPopUp()
Sub Insert(Index As Integer, Caption As String)
The first entry has got index = 1.
Sub Insert(Index As Integer, Icon As String, Caption As String)
The first entry has got index = 1.
Sub InsertSeparator(Index As Integer)
Implemented since KBasic V1.83
The first entry has got index = 1.
Sub Append(Caption As String)
Sub Append(Icon As String, Caption As String)
Might be a String containing binary data. See the binary project example for using.
Sub InsertSeparator()
Implemented since KBasic V1.83
Sub Remove(Index As Integer)
The first entry has got index = 1.
Sub RemoveAll()
Sub Select(Index As Integer)
The first entry has got index = 1.
Sub Select(Caption As String)
The search is case-sensitive means that it must exactly match the search string.
Function Selected() As Integer
The first entry has got index = 1.
Function Caption() As String
Function Index() As Integer
Function Data() As Integer
Function Caption(Index As Integer) As String
Sub SetCaption(Index As Integer, Caption As String)
Sub SetIcon(Index As Integer, Icon As String)
Function Tag(Index As Integer) As String
Sub SetTag(Index As Integer, Tag As String)
not implemented yet:
findData int findText ( const QString & text, Qt::MatchFlags flags = Qt::MatchExactly | Qt::MatchCaseSensitive ) const insert(integer, strings) append(strings) insertSeparator ( int index ) void setItemData ( int index, const QVariant & value, int role = Qt::UserRole ) void setLineEdit ( QLineEdit * edit ) → textbox void QComboBox::setView ( QAbstractItemView * itemView ) → TreeView, ListView?? →FormsView
Property Value As String (ReadWrite)
Set the current selected item.
The search is case-sensitive means that it must exactly match the search string.
Property OldValue As String (ReadOnly)
Contains the previous selected item.
Property DoubleEntry As Boolean (ReadWrite)
If it is true, it is possible to have entries with the same caption many times in the combobox list.
Property InsertPolicy As String (ReadWrite)
This property holds the policy used to determine where user-inserted items should appear in the combobox.
Possible values are
Property Editable As Boolean (ReadWrite)
It it is true, it is possible for the user to select or enter by keyboard.
Property Maximum As Integer (ReadWrite)
How many entries are allowed.
Property MaximumVisible As Integer (ReadWrite)
How many items are visible at one time, means how long is the list you can see in the popup.
Depends on the GUI style set (e.g. Windows Style, GTK Style…) and may be ignored.
Property Flat As Boolean (ReadWrite)
If it is true, appears as flat control. This is only useful to change the visual appearance.
not implemented yet: SizeAdjustPolicy minimumContentsLength iconwidth iconheight completer ValidatorRegExp
Sub OnEvent(Index As Integer, Caption As String)
This event is raised, when the user selects a new item.
The first item has got index = 1.