void set_justify( GtkJustification jtype );

Sets the alignment of the lines in the text of the label relative to each other. Gtk::JUSTIFY_LEFT is the default value when the widget is first created.

If you instead want to set the alignment of the label as a whole, use set_alignment() instead. It has no effect on labels containing only a single line.

Example 84. Setting the Justification Mode of a GtkLabel

// Create a window to hold the label.
$window = new GtkWindow();

// Set up the window to close cleanly.
$window->connect_simple('destroy', array('Gtk', 'main_quit'));

// Create a label with two lines of text.
$label = new GtkLabel("This label has\ntwo lines of text.");

// Set the justification for the label.

// Add the label to the window.

// Show the window and start the main loop.
This code will produce the window shown below.

See also: get_justify()