Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] Allow TVS_NOSCROLL to be set for a Tree

Thanks for your comments Steve.

>The comment from the code refers to the fact that when no scroll
>bars are specified and more items than are visible are added to
>the tree, then using the arrow keys to move around the items will
>not scroll to show the selection (at least it did not at the time
>the comment was written).
Actually after implementing additional tests, it does appear that
with TVS_NOSCROLL or without TVS_NOSCROLL set the scrollbars will
appear for the tree widget, although arrow keys may not scroll the
tree (it will if the tree is added to ScrolledComposite/method1).
So it appears I'm out of luck here.

>Why is the native scrolling insufficient? 
I'm evaluating porting a tool (from Swing) that requires trees
to have a specific layout, specifically with a scrollbar on the left
side while displaying left-to-right text.
Since setting the orientation to right-to-left will mirror both the
text and the scrollbar, it still wouldn't answer my requirement.

I decided to go with an approach that uses a ScrolledComposite that
wraps the tree, the ScrolledComposite does take care of selection 
and resizing.
This does work, however I have cases where the tree will display its
scrollbars until the code intercepts the change and adjust the
ScrolledComposite (usually milliseconds).

I understand the TVS_NOSCROLL set would be unsupported, however I 
couldn't find a way to either set the tree provided scrollbars
invisible,
or to adjust the right-to-left settings so only the text, not the
scrollbars, is mirrored.

Are there any ways to achieve this using the SWT API, would it be 
outside of the SWT scope or planned for a later release? 

Best regards,
Olivier Modica.



Back to the top