Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] Scrollbar doesn't allow negative values.

Try a fixed offset of MAX_INTEGER/2.
I don't know what range is supported by all platforms.  It might be safer to
use 32767 or somesuch if certain platforms are constrained to 16bit ranges.

Jeff.

> -----Original Message-----
> From: platform-swt-dev-admin@xxxxxxxxxxx 
> [mailto:platform-swt-dev-admin@xxxxxxxxxxx] On Behalf Of Randy Hudson
> Sent: May 6, 2002 10:47 PM
> To: platform-swt-dev@xxxxxxxxxxx
> Subject: RE: [platform-swt-dev] Scrollbar doesn't allow 
> negative values.
> 
> 
> I cannot add a fixed offset because the region is NOT finite. 
>  (Well, I
> supose it's MIN_INTEGER).
> The workaround would have to be to create a new offset every 
> time I update
> the extent (and thus minimums) of the freeform area, and then 
> substract
> this offset from the "selection" returned from the Scrollbar 
> during user
> scrolls, so 0 becomes 0-offset.
> 
> Also, I have to update all of the values on the scrollbar all 
> the time,
> even if just the "minimum" is changing, since really the minimum can't
> change, it's always 0.
> 
> 
> 
> |---------+---------------------------------->
> |         |           "Jeff Brown"           |
> |         |           <j9brown@math.uwaterloo|
> |         |           .ca>                   |
> |         |           Sent by:               |
> |         |           platform-swt-dev-admin@|
> |         |           eclipse.org            |
> |         |                                  |
> |         |                                  |
> |         |           05/06/2002 09:27 PM    |
> |         |           Please respond to      |
> |         |           platform-swt-dev       |
> |         |                                  |
> |---------+---------------------------------->
>   
> >-------------------------------------------------------------
> -----------------------------------------------|
>   |                                                           
>                                                  |
>   |       To:       <platform-swt-dev@xxxxxxxxxxx>            
>                                                  |
>   |       cc:                                                 
>                                                  |
>   |       Subject:  RE: [platform-swt-dev] Scrollbar doesn't 
> allow negative values.                            |
>   |                                                           
>                                                  |
>   |                                                           
>                                                  |
>   
> >-------------------------------------------------------------
> -----------------------------------------------|
> 
> 
> 
> 
> ... I expect the answer to be of the form: "Platform XYZ does 
> not support
> it
> natively."
> 
> Since you're planning on using a scrollbar, I assume the region to be
> scrolled is of a finite size.  Why not just add an offset?  Think of
> setMinimumValue() as a convenience method that unfortunately 
> does not apply
> to your scenario.
> 
> > -----Original Message-----
> > From: platform-swt-dev-admin@xxxxxxxxxxx
> > [mailto:platform-swt-dev-admin@xxxxxxxxxxx] On Behalf Of 
> Randy Hudson
> > Sent: May 6, 2002 5:55 PM
> > To: platform-swt-dev@xxxxxxxxxxx
> > Subject: [platform-swt-dev] Scrollbar doesn't allow negative values.
> >
> >
> > I am trying to create a "freeform" surface that potentially
> > extends in all
> > 4 directions.  To do this, I need to do a
> > scrollbar.setMinimumValue(int),
> > where that int might be less than zero.
> >
> > Is there any reason Scrollbar doesn't allow its setMinimum to
> > take a number
> > less than 0?
> >
> > _______________________________________________
> > platform-swt-dev mailing list
> > platform-swt-dev@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> >
> >
> 
> 
> 
> #### winmail.dat has been removed from this note on May 06 
> 2002 by Randy
> Hudson
> 
> 
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> 
> 

<<attachment: winmail.dat>>


Back to the top