Search code examples
pythoncheckboxgtkpygtk

PyGTK checkbutton's label on the left side


Is it possible to set the label for PyGTK's checkbutton on the left side instead of the default right side as the example below ?

Apple:  [x]
Orange: [ ]
Pear:   [x]

Solution

  • No. You could do it by creating a new class that inherits from gtk.CheckButton, but then the checkboxes wouldn't be lined up like in your example.

    I would suggest making your check buttons with blank labels, and then adding separate gtk.Labels to label them. Line them up in a gtk.Table or gtk.Grid.