org.gnu.gtk
public class Combo extends HBox
Deprecated:
The Combo box displays a single item and provides a pull-down list of items that can be selected. The drop-down list is displayed when the user clicks on a small arrow button to the right of the entry field.By default, the user can step through the items in the list by using the arrow keys, though this behavior can be turned off with the setUseArrows() method.
Normally the arrow keys are only active when the contents of the text entry field matches on of the items in the list. If the contents of the entry field do not match any of the items in the list items, then pressing the arrow keys does nothing. However, by calling the setUseArrowsAlways() method you can specify that the arrow keys be active always.
Constructor Summary | |
---|---|
Combo()
Construct a new Combo widget. | |
Combo(Handle handle)
Construct a new Combo from a handle to a native resource. |
Method Summary | |
---|---|
void | disableActivate()
Stops the Combo widget from showing the popup list when the Entry emits
the "activate" signal, i.e., when the return key is pressed. |
Entry | getEntry()
Get the Entry field that is a part of this combo. |
String | getText()
Retrieve the text from the combo. |
static Type | getType()
Retrieve the runtime type used by the GLib library. |
void | setCaseSensitive(boolean val)
Specifies whether the text entered into the Entry field and the text in
the line items are case sensitive.
|
void | setItemString(Item item, String itemValue)
Sets the string to place in the Entry field when a particular item is
selected. |
void | setPopupdownStrings(String[] values)
Convenience method to set all of the items in the popupdown list.
|
void | setUseArrorwsAlways(boolean val)
Specifies if the arrow keys will still work even if the current contents
of the Entry field do not match any of the items in the list.
|
void | setUseArrows(boolean val)
Specifies if the arrow (cursor) keys can be used to step through the
items in the list. |
void | setValueInList(boolean val, boolean okifEmpty)
Specifies whether the value entered in the text entry field must match
one of the values in the list. |
This may be useful when you have called setValueInList() to limit the values entered but are not worried about case differences.
Parameters: item The item to add to the list. itemValue The string value to display in the Entry if item is selected
Parameters: values The array of values to put into the popupdown list.
Parameters: val true if the arrows should still work.
Parameters: val true if the arrow keys can be used to step through the items in the list.
Parameters: val true if the value entered must match one of the values in the list. okifEmpty true if an empty value is considered valid.