Type Combo
Extends
Control.
RWT Scripting analoge to org.eclipse.swt.widgets.Combo
Constructor Attributes | Constructor Name and Description |
---|---|
Combo()
The constructor is not public.
|
Method Attributes | Method Name and Description |
---|---|
Returns an array whose first value is the
character position representing the start of the selected
text, and whose second value is the character position
representing the end of the selection.
|
|
getText()
Returns the widget text.
|
|
setSelection(selection)
Sets the selection of the text to the range specified
by an array whose first value is the
character position representing the start of the selected
text, and whose second value is the character position
representing the end of the selection.
|
|
setText(text)
Sets the contents of the receiver's text field to the given string.
|
- Methods borrowed from class Control:
- addListener, forceFocus, getBackground, getCursor, getEnabled, getForeground, getToolTipText, getVisible, removeListener, setBackground, setEnabled, setForeground, setToolTipText, setVisible
- Methods borrowed from class Widget:
- getData, setData
Event Attributes | Event Name and Description |
---|---|
Sent when the widget text is changed
|
|
Sent before the widget text is changed
|
- Events borrowed from class Control:
- Dispose, FocusIn, FocusOut, Hide, KeyDown, KeyUp, MouseDoubleClick, MouseDown, MouseEnter, MouseExit, MouseMove, MouseUp, MouseWheel, Paint, Show
Indexing is zero based. The range of a selection is from 0..N where N is the number of characters in the widget.
- Returns:
- {int[]} array representing the selection start and end
- Returns:
- {string} the widget text
Indexing is zero based. The range of a selection is from 0..N where N is the number of characters in the widget.
Text selections are specified in terms of caret positions. In a text widget that contains N characters, there are N+1 caret positions, ranging from 0..N. This differs from other functions that address character position such as getText () that use the usual array indexing rules.
- Parameters:
- {int[]} selection
- array representing the selection start and end
Note: The text field in a Combo
is typically only capable of
displaying a single line of text. Thus, setting the text to a string
containing line breaks or other special characters will probably cause it
to display incorrectly.
- Parameters:
- {string} text
- the new text
- Parameters:
- {Event} event
- See:
- SWT.Modify
- Parameters:
- {Event} event
- See:
- SWT.Verify