On Fri, Feb 13, 2004 at 05:19:27PM -0500, Steve McClure wrote: > I'm using GTK 1.2 and PyGTK
Note: if what you're using is an autocomplete widget, take a look at Kiwi/Basic.py from CVS -- Ricardo and I wrote one a while back, and I've been tweaking it ever since. > I have a handler for the 'changed' signal in a combobox.event widget. I > fill in the combobox.list widget list items dynamically. I have a helper > function that I pass all list items and the one I want selected and it > calls list.clear_items() then list.append_items(itemList). When I do > this, the first item in the list is automatically selected and the > entryWidgetChangedCallback is called. Then I do a > combo.list.select_item(desiredSelection) with the thing passed to my > helper, thus calling the entryWidgetChangedCallback again. Since my > entryWidgetChangedCallback is slow, I want to avoid this. Have you tried using an instance variable to block calling the changed callback (or to make it return early)? I use this in my widget and it works really well. I think I follow what you're doing, and trying to get GTK+ to stop and emit the signals you want is going to be more work than a self._block here and there. Take care, -- Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331 _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
