Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Not scroll when related scrollbar disposed
Not scroll when related scrollbar disposed [message #1296582] Tue, 15 April 2014 04:25 Go to next message
Jingang Zhou is currently offline Jingang ZhouFriend
Messages: 57
Registered: December 2010
Member
Hi, all

I want to realize the effect of scrolling by code rather than by drag the scrollbar of a tree, so I dispose the scrolbar using the code like :
tree.getVerticalBar().dispose();

and in another event listener I write like :
tree.setTopItem(specifiedItem);


I found that the second code only works under the situation that the scrolbar is not disposed, but Why?

And this is different from a table widget, since I can control the scrolling of a table even its related scollbar is disposed.

Who can explain this?
Thanks.

Robin.

[Updated on: Tue, 15 April 2014 04:26]

Report message to a moderator

Re: Not scroll when related scrollbar disposed [message #1300074 is a reply to message #1296582] Thu, 17 April 2014 10:00 Go to previous message
Jingang Zhou is currently offline Jingang ZhouFriend
Messages: 57
Registered: December 2010
Member
Using the code example at http://www.java2s.com/Tutorial/Java/0280__SWT/Fixedfirstcolumnandhorizontalscrollremainingcolumns.htm I can dispose the vertical scrollbar of the left table and it is still sync with the right table, but when I change the left table to a tree, it only works that the vertical scrollbar of the tree is not disposed.

Who can explain this or sovle my issue?
Any suggestions would be appreciated.

Robin.
Previous Topic:how to hide the dotted lines between tree nodes
Next Topic:Calling refresh() on tableViewer clears the table data
Goto Forum:
  


Current Time: Tue Apr 23 14:49:29 GMT 2024

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

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

Back to the top