GtkEntry Class

The GtkEntry class is the class for instantiating text entry widgets.

The class heirarchy


   Object
      +---GtkWidget
         +---GtkEntry

The methods for the GtkEntry class are documented below.

GtkButton Method Table of Contents

new - Create and initialize the widget
maxlength - Get the max length of text
maxlength = - Get the max length of text
text - Get the text in the entry widget
text = - Set the text in the entry widget
widthchars = - Set the visible width of the widget


Method: new

This method creates and initializes the widget.

Example

This is a example of how to create a text entry widget.


myentry = .GtkEntry~new()

Method Parameters

None.

Method Results

The new GtkEntry object.




Method: maxlength

This method retrieves the maximum text length from the widget.

Example

This is a example of how to retrieve the maximum text length.


len = myentry~maxlength()

Method Parameters

None.

Method Results

len
The maximum text length in characters.



Method: maxlength =

This method sets the maximum text length for the widget.

Example

This is a example of how to set the maximum text length.


len = 10
myentry~maxlength = len

Method Parameters

len
The maximum text length in characters.

Method Results

None.




Method: text

This method retrieves the text from the widget.

Example

This is a example of how to retrieve the text.


text = myentry~text()

Method Parameters

None.

Method Results

text
The text from the widget.



Method: text =

This method sets the text for the widget.

Example

This is a example of how to set the text.


text = 'David'
myentry~text = text

Method Parameters

text
The text to set.

Method Results

None.




Method: widthchars =

This method sets the maximum visible width for the widget.

Example

This is a example of how to set the maximum visible width.


width = 10
myentry~widthchars = width

Method Parameters

width
The visible text width in characters.

Method Results

None.




Valid XHTML 1.0!