set_direction


Description:

public void set_direction (TextDirection dir)

Sets the reading direction on the widget.

This direction controls the primary direction for widgets containing text, and also the direction in which the children of a container are packed. The ability to set the direction is present in order so that correct localization into languages with right-to-left reading directions can be done.

Generally, applications will let the default reading direction prevail, except for widgets where the children are arranged in an order that is explicitly visual rather than logical (such as buttons for text justification).

If the direction is set to [enum@Gtk.TextDirection.none], then the value set by [func@Gtk.Widget.set_default_direction] will be used.

Parameters:

this

a widget

dir

the new direction