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



Hi Paul !

> 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.

This is already implemented in the 1.3 developer tree. From the Changelog :

Sun Feb 28 16:46:02 1999  Stefan Jeske  <stefan@gtk.org>

        * gtk/gtkspinbutton.[c,h] gtk/testgtk.c: Added two new signals to 
        GtkSpinButton, "input" and "output", to make the output more flexible.
        The user has to provide a mapping between adjustment->value and the
        output string (and vice versa, if the spin button is editable). 
        See testgtk for examples.

This might fit your needs. Just have a look at the testgtk sample.

bye,
   Stefan



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