GtkLabel Class

The GtkLabel class is the class for instantiating text label widgets.

The class heirarchy


   Object
      +---GtkWidget
         +---GtkLabel

The methods for the GtkEntry class are documented below.

GtkButton Method Table of Contents

new - Create and initialize the widget
justify - Get the text justification
justify = - Set the text justification
text = - Set the text in the label widget


Method: new

This method creates and initializes the widget.

Example

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


text = 'My label'
mylabel = .Gtklabel~new(text)

Method Parameters

text
(Optional) The text of the label.

Method Results

The new GtkLabel object.




Method: justify

This method gets the text justification for the widget.

Example

This is a example of how to get the text justification.


justify = mylabel~justify

Method Parameters

None.

Method Results

justify
Returns one of the following strings.

GTK_JUSTIFY_LEFT
GTK_JUSTIFY_RIGHT
GTK_JUSTIFY_CENTER
GTK_JUSTIFY_FILL



Method: justify =

This method sets the text justification for the widget.

Example

This is a example of how to set the text justification.


justify = 'GTK_JUSTIFY_LEFT'
mylabel~justify = justify

Method Parameters

justify
Must be one of the following strings.

GTK_JUSTIFY_LEFT
GTK_JUSTIFY_RIGHT
GTK_JUSTIFY_CENTER
GTK_JUSTIFY_FILL

The default is GTK_JUSTIFY_CENTER.

Method Results

None.




Method: text =

This method sets the text for the widget.

Example

This is a example of how to set the text.


text = 'David'
mylabel~text = text

Method Parameters

text
The text to set.

Method Results

None.




Valid XHTML 1.0!