On Wed, Jan 14, 2004 at 03:46:11PM -0500, [EMAIL PROTECTED] wrote: > > Hi all, I want to use a combo like a html combo. I mean, I want to > > attach a number to the selected string. For example, if a fill the combo > > with data from a employee records like: > > 1, John Doe > > 2, Duffy Duck > > 3, Micky Mouse > > > > I want that the combo display the names, but if I do > > mycombo.entry.get_text() I want the number, maybe there is another > > function that get_text that do the trick, but I don't know. Thanks in > > advance. > > I usually just use set_data when building the choices and get_data when > the selection occurs.
Except if you set_popdown_strings in between these events you'll find your data is gone (because the items are destroyed and recreated), which is what happens for autocompletion widgets, for instance. If you never call set_popdown_strings then your suggestion is appropriate. 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/
