On Thu, 2009-06-04 at 08:52 -0400, Mike Bernson wrote:
>
> Walter Leibbrandt wrote:
> > Mike Bernson wrote:
> >> I have a notebook that I want to control where the focus goes on page
> >> switches.
Have a similar need to know when a user clicks on a tab to activate the
page.
I place an event box in the tap, and the label in the event box like so:
evb = gtk.EventBox()
evb.set_visible_window(False)
lab = gtk.Label(self.label)
evb.show()
lab.show()
evb.add(lab)
evb.connect("button_release_event", self.on_tab_button_pressed)
# call on user click
self.page.reparent(self.main_notebook) # adding page to not
book
self.main_notebook.set_tab_label(self.page, evb) # setting the
evb as label for page.
--
Rob Brown-Bayliss
http://globalvillage.sourceforge.net
The world at your finger tips...
____________________________________
The reasonable person adapts to the
world; the unreasonable one persists
in trying to adapt
the world to themselves. Therefore,
all progress depends on unreasonable
people.
____________________________________
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/