Re: [gtk-list] Combobox?



On Wed, Nov 26, 1997 at 10:22:51PM -0500, Kenneth Albanowski wrote:
> Has anyone done any work on a Combo box (that drop-down Windows(tm) widget
> that combines an Entry and a List Box)? This is the widget that has always
> given Tcl/Tk fits, and it would be wonderful if Gtk included it
> "out-of-the-box".

I uploaded to ftp.gimp.org:/incoming and to 
ftp.pluto.linux.it:/pub/pluto/developers a gtkcombo widget that can be
useful.

This is a Combo widget for Gtk+. 

It's a composite widget (an HBox) and it has an entry and a list.
You can use it like an entry and to track changes you should connect
to the "changed" signal of combo->entry.

The list can contain anything, but you should supply a function
if you want to use widgets other than GtkLabels to get a string out
of your widgets (an example is provided for a two-column list).
The value in the entry can be limited to those in the list
using gtk_combo_set_flag(combo, GTK_COMBO_IN_LIST_VALUE).

It would be useful to add completion support in the entry.

I haven't found a way to set the size correctly for the popup
window (it's incorrect for lists with few items).

Have fun.

-- 
------   
--      Molaro Paolo  lupus@dei.unipd.it
------  Mange', mange': nu sei chi ve mangia'. [FdA]



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