Problems with ScrollBar [message #156560] |
Tue, 02 November 2004 13:46 |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03293 seconds