Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Problems with ScrollBar
Problems with ScrollBar [message #156560] Tue, 02 November 2004 13:46 Go to next message
Eclipse UserFriend
Originally posted by: mihai_sarda.classys.net

Hello all,
I have a problem with my scroll bar.
First I have to say that I do have a scroll bar that has to be removed and
that another scroll bar has to be added. So it is like this: in the
begining I have a figure that has a scoll bar and when I push delete the
scroll bar has to be removed. When I push s, another scroll bar has to be
added to the figure.
Here is some code I wrote:

public void add(IFigure figure, Object constraint, int index){

if(figure instanceof ScrollFigure){
this.scrollPane.setVerticalScrollBar((ScrollFigure)figure);

scrollPane.setVerticalScrollBarVisibility(ScrollPane.ALWAYS) ;
}

else
..........
}
Well my figure has a child figure that is a scrollPane. When I add a
ScrollFigure (which is actually a ScrollBar) I have to add it to the
scrollPane.

My problem is this:
In the begining everything is all right (meaning that the scrollbar is
painted correctly).
After that I delete the scrollBar.
When I add anoher scrollBar there begins to be a problem:
If the figure that I want to scroll does not need scrolling the thumb of
the scroll bar appears over the up_arrow
If the figure I want to scroll needs scrolling everything is ok

Can anyone tell me what did I do wrong, please.

Sorry for this huge message,
Thanks for looking over it
mihai
Re: Problems with ScrollBar [message #156897 is a reply to message #156560] Fri, 05 November 2004 00:15 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Can you provide a snippet reproducing the problem?

"mihai sarda" <mihai_sarda@classys.net> wrote in message
news:cm8348$s8v$1@eclipse.org...
> Hello all,
> I have a problem with my scroll bar.
> First I have to say that I do have a scroll bar that has to be removed and
> that another scroll bar has to be added. So it is like this: in the
> begining I have a figure that has a scoll bar and when I push delete the
> scroll bar has to be removed. When I push s, another scroll bar has to be
> added to the figure.
> Here is some code I wrote:
>
> public void add(IFigure figure, Object constraint, int index){
>
> if(figure instanceof ScrollFigure){
> this.scrollPane.setVerticalScrollBar((ScrollFigure)figure);
>
> scrollPane.setVerticalScrollBarVisibility(ScrollPane.ALWAYS) ;
> }
>
> else
> ..........
> }
> Well my figure has a child figure that is a scrollPane. When I add a
> ScrollFigure (which is actually a ScrollBar) I have to add it to the
> scrollPane.
>
> My problem is this:
> In the begining everything is all right (meaning that the scrollbar is
> painted correctly).
> After that I delete the scrollBar.
> When I add anoher scrollBar there begins to be a problem:
> If the figure that I want to scroll does not need scrolling the thumb of
> the scroll bar appears over the up_arrow
> If the figure I want to scroll needs scrolling everything is ok
>
> Can anyone tell me what did I do wrong, please.
>
> Sorry for this huge message,
> Thanks for looking over it
> mihai
>
Previous Topic:PrintAction is not scaling images in Labels
Next Topic:Overview Woes - snap shot of the canvas
Goto Forum:
  


Current Time: Thu Apr 25 03:34:53 GMT 2024

Powered by FUDForum. Page generated in 0.07067 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top