[pygtk] problem with focus in notebook
Rob Brown-Bayliss
r.brown.bayliss at gmail.com
Fri Jun 5 15:15:29 WST 2009
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.
____________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20090605/0b317d3d/attachment.htm
More information about the pygtk
mailing list