Re: [pygtk] Callbacks

2009-03-11 Thread Walter Leibbrandt
Hi, Maybe I should just let some code do the talking. See attached script. The button's "clicked" handler adds an "x" to the entry. The toggle button uses handler_(un)block_by_func() on addx_clicked so that it is only enabled if the toggle button is active. Note that handler_(un)block_by_func

Re: [pygtk] Callbacks

2009-03-11 Thread Peyman
Hi Walter I am running into problems using it. To use handler_bloc_by_func(callable) you have to pass callable: a callable python object. I have tried using the widget itself, and it's callback functions, but neither is working. What exactly do i have to pass as a parameter. You made refer

[pygtk] Drawing area

2009-03-11 Thread Peyman
Hello What does it mean when a drawing area causes other labels to go blank? I just added a new drawing area, and when I load the tab with the DA in it, some of the tab labels go missng, other labels go missing, so do the button labels. Am I forgetting to 'close' something? I know that, if

Re: [pygtk] Callbacks

2009-03-11 Thread Walter Leibbrandt
Hi, It seems that this has been asked before: http://osdir.com/ml/gnome.gtk+.python/2003-04/msg00089.html Short answer: no, it doesn't seem like you can. I have, however, found the handler_block_by_func() and handler_unblock_by_func() methods of gobject.GObject. Although I haven't tested this

Re: [pygtk] Callbacks

2009-03-11 Thread Peyman
Hi Walter I realize that once you call connect() it returns the handle_id. But if glade is doing this for me, are the handle id's stored somewhere? Surely there has to be a widget.get_handle_id('callback_function') method. I can't seem to find anything on this over the net though. Cheers

[pygtk] Text border inside a TextView

2009-03-11 Thread Walter Leibbrandt
Hi everyone, I'm trying to show the "selection" of a certain sub-string in a gtk.TextView by drawing a border around the word. The only way to mark text in a TextView that I've found so far is by placing TextTags with modified properties. This does not seem to offer a way to draw a border, tho

Re: [pygtk] Callbacks

2009-03-11 Thread Peyman
Hello Walter That's exactly what I was looking for Cheers Peyman Askari On 11 Mar 2009, at 07:56, Walter Leibbrandt wrote: > Hi, > > Peyman wrote: >> Hello >> >> Is there a clean way to temporarily cancel callbacks? For example >> consider a combobox CB1 with the following callback functio

Re: [pygtk] Callbacks

2009-03-11 Thread Walter Leibbrandt
Hi, Peyman wrote: > Hello > > Is there a clean way to temporarily cancel callbacks? For example > consider a combobox CB1 with the following callback function > > on_CB1_changed(...): > someVar= the new entry > > now if I manually change the combobox to, for example "Select item", I > do