Re: Combo Box: ID & String Pairs?



On Wed, May 05, 2004 at 11:06:35 +1000, Daniel Kasak wrote:
The documentation for GTK2::combo simply says:

$combo->set_popdown_strings (...)

where ... is a list of strings.

Does this mean that you can't have a combo box with ID & string pairs? 
I'm populating my combo from a database, and it would be great if I 
could have the combo's value set to an ID ( a primary key ) while 
displaying the associated text.

The widget does not support that. After all a combo box widget is an
*entry* with pop-down and allows the user to enter the string manualy.

Perhaps you should use Gtk2::OptionMenu instead (and use an ItemFactory
to create the entries).

-------------------------------------------------------------------------------
                                                 Jan 'Bulb' Hudec <bulb ucw cz>

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]