Re: [gtk-list] Double float for spinbutton.adjustment.value ?



On Wed, 24 Nov 1999 15:19:53 +0000, Jorge Sousa wrote:
> For scientific applications where numbers may have more than 8 decimal
> digits it could be helpfull if the value of a spinbutton is a double float.

I don't understand, I think you're using the wrong widget. You want to use
a spinbutton to ask the user to select a value with more than 8 digits.
Spinbuttons are normally used to select a value in a small range. I think
you'd better use a text entry.

> Is it possible to change the type using a function call or the gtk+ code
> must be changed and the library recompiled?

You'd better not break the library, other applications who expect a float
might break. Copy the widget source from the GTK library, readjust it to
your needs and rename it to (for example) gtk_spin_button_double. See the
GTK tutorial about adding widgets.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/




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