Skip to content

Gtk.Orientable

interface

An interface for widgets that can be oriented horizontally or vertically.

GtkOrientable is more flexible in that it allows the orientation to be changed at runtime, allowing the widgets to “flip”.

CSS nodes

GtkWidget types implementing the GtkOrientable interface will automatically acquire the horizontal or vertical CSS class depending on the value of the Orientable.orientation property.

Methods

get_orientation

def get_orientation(self) -> Orientation

Retrieves the orientation of the orientable.

set_orientation

def set_orientation(self, orientation: Orientation | int) -> None

Sets the orientation of the orientable.

Parameters:

  • orientation — the orientable’s new orientation

Properties

orientation

orientation: Orientation | int  # read/write

The orientation of the orientable.