Re: scale problem



Chris Roadfeldt <chris roadfeldt com> writes:

> Hello all,
> 
> 	I am having an annoying problem with a couple of scale widgets. The
> code to create the scales is quite large, but it works. The core of the
> problem is the scale allows a value 1 larger than the adjustment max.
> The adjustment max I am setting is 2147483647, but when the scale is
> moved to the max, it returns 2147483648 as the adjustment value. This
> causes my app to do bad things. I can set the adjustment max to a lower
> value, but this seems like a hack. I would rather fix the problem
> itself. Does anyone have any ideas?

If this is with GTK+-1.2, the problem you are running into is  the
limited precision of 'float' variables that store adjustment values.
Your max value probably got rounded to the nearest representable value.

Regards,
                                        Owen



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