Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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

share|improve this answer
    
Will take it a look and I'd be back –  Hernantz Jun 23 '12 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 '12 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 –  Florian Diesch Jun 23 '12 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 '12 at 23:52
    
They have their own drawing methods, see the class SectionSelector in /usr/share/software-center/softwarecenter/ui/gtk3/widgets/buttons.py –  Florian Diesch Jun 24 '12 at 23:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.