I'm trying to make a list that only appears while the pointer is over it
and is hidden otherwise. After playing with show(), hide(), and (un)map(),
I'm currently trying GtkNotebook. I've connected set_page methods to the
{enter,leave}-notify-event signals of the notebook (see below), but when
the clist page comes up, more enter/leave signals are emitted and the
notebook flickers, even though I haven't enabled the
{ENTER,LEAVE}_NOTIFY_MASK on the clist.
Now how can I prevent this, or is there a better approach?
Thanks,
David Bustos
---------------------------------------------------------------------------
from gtk import *
w = GtkWindow()
w.set_usize(100,200)
w.connect('destroy', mainquit)
nb = GtkNotebook()
nb.set_show_tabs(TRUE)
nb.add_events(GDK.ENTER_NOTIFY_MASK | GDK.LEAVE_NOTIFY_MASK)
w.add(nb)
nb.insert_page(GtkLabel('A page.'), GtkLabel('A tab'), 0)
clist = GtkCList(2, ('Stuff', ''))
for i in range(5): clist.append(('item', `i`))
nb.insert_page(clist, GtkLabel('Another tab'), 1)
nb.connect('enter-notify-event', lambda nb,event: nb.set_page(1))
nb.connect('leave-notify-event', lambda nb,event: nb.set_page(0))
w.show_all()
mainloop()
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]