public interface Editable
Modifier and Type | Interface and Description |
---|---|
static interface |
Editable.Changed
The signal emitted when the text in the Editable has changed.
|
Modifier and Type | Method and Description |
---|---|
void |
connect(Editable.Changed handler)
Hook up a handler for
Editable.Changed signals. |
int |
getPosition()
Retrieves the current cursor position.
|
int |
getSelectionBoundsEnd()
Retrieves the selection end position of the Editable.
|
int |
getSelectionBoundsStart()
Retrieves the selection start position of the Editable.
|
void |
selectRegion(int start,
int end)
Select a region of the text in this Editable.
|
void |
setPosition(int position)
Set the position of the cursor in this Editable.
|
void connect(Editable.Changed handler)
Editable.Changed
signals.int getPosition()
int getSelectionBoundsEnd()
getSelectionBoundsStart()
and
getSelectionBoundsEnd()
will be identical.int getSelectionBoundsStart()
getSelectionBoundsStart()
and
getSelectionBoundsEnd()
will be identical.void selectRegion(int start, int end)
start
up to but not including end
will
be selected.
Calling selectRegion(0, 0)
will remove the selection
(although that will only happen if some other Widget has the focus; in
Windows where there is only one control the user can manipulate an
Entry will end up selected no matter what).
end
- If negative, then the selection will be from
start
to the end of the text in the Editable.void setPosition(int position)
position
- The value given must be less than or equal to the number of
characters currently in the Editable field. Supplying a
value of -1
will cause the cursor to move to a
position after the last character in the text.