Re: [gtk-list] Project : Spin Button




> Hi folks !
> 
> Is anybody out there working on a spin button (a la OS/2) ?
> We'd like to start writing such a widget (shouldn't be too
> hard).
> 
> A spin button simply consists of an entry field with two 
> arrow buttons (up and down) to the right of it :
> 
>  ------------- /\
>  |    Item   | --  
>  ------------- \/ 
>  
> It allows you to spin through a list of strings,
> or increment/decrement integers or floats within
> a specified range.

If you implement something like this, you should probably restrict
it to the case of integers/floats. Strings are better handled
by a combobox or option menu widget.

Such a widget should probably use a GtkAdjustment to store
the value (like a scale widget) - It would use the
lower, upper, value, and step_increment fields.

(UI critique - spinners can be pretty annoying since they can
require a lot of button clicks to get to where you want. I would
almost always prefer having a entry+scale if there are a lot
of possibilities or a combobox/optionmenu if there are a few.
But spinners are space efficient if the user actually 
wants to just increment or decrement the value by one or two.)

Regards,
                                        Owen



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