interface XTextComponent in module com::sun::star::awt::

(Global Index)

Syntax

interface XTextComponent : com::sun::star::uno::XInterface ;

Description

gives access to the text of a text component and makes it possible to register event listeners.

Method Summary

addTextListener registers a text event listener.

removeTextListener unregisters a text event listener.

setText sets the text of the text field.

insertText inserts text at the given position.

getText

getSelectedText

setSelection sets the user selection.

getSelection

isEditable

setEditable makes the text editable for the user or read-only.

setMaxTextLen sets the maximum text length.

getMaxTextLen

Known Services Which Export this Interface

com::sun::star::awt::UnoControlEdit

Method Details



addTextListener

Syntax

oneway void addTextListener (
com::sun::star::awt::XTextListener l );

Description

registers a text event listener.


removeTextListener

Syntax

oneway void removeTextListener (
com::sun::star::awt::XTextListener l );

Description

unregisters a text event listener.


setText

Syntax

oneway void setText (
string aText );

Description

sets the text of the text field.


insertText

Syntax

oneway void insertText (
com::sun::star::awt::Selection Sel,
string Text );

Description

inserts text at the given position.


getText

Syntax

string getText ();

Returns

the currently set text of this text component.

getSelectedText

Syntax

string getSelectedText ();

Returns

the currently selected text.

setSelection

Syntax

oneway void setSelection (
com::sun::star::awt::Selection aSelection );

Description

sets the user selection.


getSelection

Syntax

com::sun::star::awt::Selection getSelection ();

Returns

the current user selection.

isEditable

Syntax

boolean isEditable ();

Returns

whether the text is editable by the user.

setEditable

Syntax

oneway void setEditable (
boolean bEditable );

Description

makes the text editable for the user or read-only.


setMaxTextLen

Syntax

oneway void setMaxTextLen (
short nLen );

Description

sets the maximum text length.


getMaxTextLen

Syntax

short getMaxTextLen ();

Returns

the currently set maximum text length.
Top of Page