How to put the vertical scroll bar on the left hand side of the tree?
Asked
Active
Viewed 1,379 times
1
-
1imho, that would be very unexpected to end-user – parxier Jul 12 '10 at 23:13
-
The scroll bar cutting through the connection lines to the right side in this example is uncomfortable. anyways, question is, can it even be done? – codekitty Jul 14 '10 at 09:43
1 Answers
2
If you are on Windows only, you could do this:
int exStyle = OS.GetWindowLong(tree.handle, OS.GWL_EXSTYLE);
exStyle |= OS.WS_EX_LEFTSCROLLBAR;
OS.SetWindowLong(tree.handle, OS.GWL_EXSTYLE, exStyle);
Otherwise you might want to look into Snippet296, which shows how to handle scrolling for a Tree using a ScrolledComposite. By adding the style SWT.RIGHT_TO_LEFT to ScrolledComposite, and SWT.LEFT_TO_RIGHT to the Tree in this snippet, I had a scroll bar on the left. But I failed to fix the positioning issue of the Tree, which comes up then.

Thomas S.
- 5,804
- 5
- 37
- 72

the.duckman
- 6,376
- 3
- 23
- 21
-
thanks a lot!! I also tried something similiar to the snippet before (using a slider) and it's just too "shaky". couldn't get much further with the snippet either the windows flag works perfect and that's enough for now. – codekitty Jul 15 '10 at 11:12