Re: [gtk-list] Re: Userdefined list in gtk_spin_button ?



>> Example: I was able to create a spin_button with a range from lets say
>> 0 to 19.   I was also able to create a gtk_combo with a userdefined list
>> of characterstrings. However, these appear as popdown strings, from
>> which one can be selected.  For larger lists I would prefer the way
>> how gtk_spin_button works, but couldn't find out how to do that.
>>
>>   If this is not possible, what is another good way with GTK to let a user
>> select a specific string out of a large number of characterstrings ?
>> Thanks for any recommendations, Herbert
>
>GtkCombo is generally friendlier on the user, since most people
>don't really like clicking arrows lots and lots of times. ;-)

just grab the relevant navigation key press events from the entry
button, and bind them to the same functions as the mouse. works like a
charm, although it forces me to override what i regard as a poor
decision in GTK+ : the default use of TAB and Up/Down for focus navigation.

>You can also use a GtkOptionMenu which is a slightly different variant
>on the theme. (But that is limited by the fact that Gtk menus
>don't scroll).

Personally, I use a CList for this, with the widget size set to show
just enough of a scroll bar that navigation is possible.

But for other reasons, I think I may soon need to cook up a version of
the spinbutton that is more programmer-customizable. XForms has a nice
model of such a beast, where the display values of the button not
necessarily numeric, and a filter function is called to take the
current numeric value and convert it to some representation. If the
filter is NULL, it just prints it with some specified precision. This
is much friendlier than the current spin button, which is inevitably
tied to numbers.

--p





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