Associating FigureCanvas with external Sliders [message #232969] |
Fri, 13 April 2007 21:28 |
Eclipse User |
|
|
|
Originally posted by: alnospammajor.noboxspamspoon.com
i'd like to disable the scrollbars on a FigureCanvas and associate the
viewport rangemodels with a pair of external sliders.
is it sufficient to subclass FigureCanvas and override
getHorizontalBar() and getVerticalBar() to return the appropriate
external Slider widgets? or is a more complex solution required?
thx,
al
|
|
|
Re: Associating FigureCanvas with external Sliders [message #232980 is a reply to message #232969] |
Fri, 13 April 2007 21:57 |
Eclipse User |
|
|
|
Originally posted by: alnospammajor.noboxspamspoon.com
looks like this "solution" will not work. getHorizontalBar returns a
ScrollBar not a Slider, so it's a no go from the start.
it also looks like there's no way to construct a FigureCanvas without
setting the style bits SWT.V_SCROLL and SWT.H_SCROLL so i'll wind up
with those widgets whether i use them or not. i can probably live with
this, but it'd be nice if there were some way of constructing a
FigureCanvas to a) suppress creation of the standard scroll bars and/or
b) wire it to external sliders.
Al Major wrote:
> i'd like to disable the scrollbars on a FigureCanvas and associate the
> viewport rangemodels with a pair of external sliders.
>
> is it sufficient to subclass FigureCanvas and override
> getHorizontalBar() and getVerticalBar() to return the appropriate
> external Slider widgets? or is a more complex solution required?
>
> thx,
>
> al
|
|
|
|
Re: Associating FigureCanvas with external Sliders [message #233047 is a reply to message #233015] |
Mon, 16 April 2007 22:36 |
Eclipse User |
|
|
|
Originally posted by: alnospammajor.noboxspamspoon.com
so it appears i'm not the only person with this use case (not
surprising, but it's nice to have confirmation).
i can fix my own problem in two ways.
i) use glue code around FigureCanvas to attach it to external sliders.
ii) refactor FigureCanvas so that it allows the possibility of external
sliders (egs. doesn't create internal sliders in that case).
ii) will likely be more work and is only worth doing if my changes make
it back into the GEF codebase.
what's the interest level in having this happen? could one of the
committers comment? if there's any interest in this, can someone provide
quick pointers on what to do?
thx,
al
Manuel Selva wrote:
> Hi,
>
> On the FigureCanvas you have a methods to set the visibility of both
> vertical and horizontal scrollbars. Calling these methods with false
> will hide the scrollbars. Then you just have to notify these invisble
> scrollbars each time your own sliders change (thumb, selection,
> increment ...)
>
> Hope this can help
>
> Manuel
>
|
|
|
Re: Associating FigureCanvas with external Sliders [message #233598 is a reply to message #233015] |
Thu, 26 April 2007 22:06 |
Eclipse User |
|
|
|
Originally posted by: alnospammajor.noboxspamspoon.com
it turns out that it is not necessary to fiddle with the invisible
scrollbars. but you do have to wire the sliders to the FigureCanvas
viewport range models.
the invisible scrollbars do seem to cause problems when calculating the
trim. so it would be nice to fix figure canvas to explicitly support
this use case.
Manuel Selva wrote:
> Hi,
>
> On the FigureCanvas you have a methods to set the visibility of both
> vertical and horizontal scrollbars. Calling these methods with false
> will hide the scrollbars. Then you just have to notify these invisble
> scrollbars each time your own sliders change (thumb, selection,
> increment ...)
>
> Hope this can help
>
> Manuel
>
|
|
|
Powered by
FUDForum. Page generated in 0.05551 seconds