Re: Max value set for slider is not actual max value in use.
- From: Rasmus Hahn <rassahah cs tu-berlin de>
- To: Christian Seberino <seberino spawar navy mil>
- Cc: Valdis Kletnieks vt edu, gtk-list gnome org
- Subject: Re: Max value set for slider is not actual max value in use.
- Date: Wed, 13 Mar 2002 14:31:43 +0100
On Tue, Mar 12, 2002 at 01:43:35PM -0800, Christian Seberino wrote:
> Your suggestion makes perfect sense to me. It seems like that
> *must* be what is wrong. Yet I checked my code and can't see it....
>
> #define INI_N_MASSES 1
> #define MIN_N_MASSES 1
> #define MAX_N_MASSES 2048
> #define INC_N_MASSES 1
>
> ...
>
> numberOfMassesSliderAdj = GTK_OBJECT(gtk_adjustment_new(
> INI_N_MASSES, MIN_N_MASSES, MAX_N_MASSES, INC_N_MASSES,
> INC_N_MASSES, INC_N_MASSES));
Try to set the pagesize of the adjustment to 0. It seems the slider
tries to fit a 'page' in the range [min...max], like it is needed for
scrollbars, but not so useful for scales without a 'page'. So
gtk_adjustment_new (0, 0, 1000, 1, 1, 0) should make the slider value
get the whole range.
>
> I could not move slider farther to right then 2047.
>
> Chris
>
>
> On Tue, Mar 12, 2002 at 04:00:41PM -0500, Valdis Kletnieks vt edu wrote:
> > On Tue, 12 Mar 2002 12:58:16 PST, Christian Seberino <seberino spawar navy mil> said:
> > > If I make a slider for a value that goes from
> > > 0 to 2000, then leftmost value is 0
> > > *BUT*, rightmost value is 1999!!!
> > >
> > > Why do I lose the last number?
> >
> > Sounds like a fencepost error to me. Is it "min 0 max 2000", or "min 0
> > steps 2000"? 0..1999 is 2000 points.
> > --
> > Valdis Kletnieks
> > Computer Systems Senior Engineer
> > Virginia Tech
> >
>
>
>
> --
> =======================================================
> | Dr. Christian Seberino || (619) 553-7940 (office) |
> | SPAWARSYSCEN 2363 || (619) 553-2836 (fax) |
> | 53560 HULL ST || |
> | SAN DIEGO CA 92152-5001 || seberino spawar navy mil |
> =======================================================
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]