Re: CellRendererSpinButton and negative values



muppet wrote:

<snipped>

  the array reference at line 57 is

   ['value', 'Value', 'How much is the fish', 0.0],

and the Glib::ParamSpec::double call places those values respectively in the "name", "nickname", "blurb", and "default_value" parameters. three other parameters are hard-coded there --- "minimum" ('0.0' at line 53), "maximum" (DBL_MAX at line 54), and "flags" (readable & writable, at line 56).

thus, this defines those four parameters to be doubles with legal values being the set [0.0, DBL_MAX].

if you want to change the legal range, you'll want to pull 'step' out of the map statement (negative values are not sensible for the 'step' parameter, which is passed to the SpinButton's step parameter to determine the increment used by the arrow buttons), and change the min & max to taste.


Thanks :)

It's working very well now.

Dan

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak nusconsulting com au
website: http://www.nusconsulting.com.au
Title: CanIt Vote for ID 108956

The following links have been inserted by the NUS Consulting internal spam filter and are for NUS Consulting staff only
Spam
Not spam
Forget previous vote


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