3

I want to implement something similar to the ubuntu software center's tabs.

enter image description here

What widget is it?

Any working example in python where I could take a look?

Is this widget available in Glade?

Thanks in advance.

1 Answer 1

3

It's a Gtk.Toolbar, see /usr/share/software-center/softwarecenter/ui/gtk3/panes/globalpane.py for how it is created.

5
  • Will take it a look and I'd be back
    – Hernantz
    Jun 23, 2012 at 17:28
  • Ok it is a Gtk.Toolbar, and the tabs are buttons. Now, I know this would be out of scope for this question but, I cant find how to set the visual active state for those buttons...
    – Hernantz
    Jun 23, 2012 at 21:25
  • The buttons are instances of a subclass of Gtk.ToggleButton so you can use set_active(is_active) where is_active is a bool Jun 23, 2012 at 22:14
  • thanks, actually a toolbar can have many different buttons so, I added a ToggleButton. They look different though, maybe the have some styling hack there.
    – Hernantz
    Jun 23, 2012 at 23:52
  • They have their own drawing methods, see the class SectionSelector in /usr/share/software-center/softwarecenter/ui/gtk3/widgets/buttons.py Jun 24, 2012 at 23:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .