Skip to main content

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

Hi,

This is a thread about TVS_NOSCROLL for the Tree widget, and discusses
why disablin it can be restrictive.

I read and understand the following comments in Tree#checkStyle():
/**
 * Feature in Windows.  It is not possible to create
 * a tree that scrolls and does not have scroll bars.
 * The TVS_NOSCROLL style will remove the scroll bars
 * but the tree will never scroll.  Therefore, no matter
 * what style bits are specified, set the H_SCROLL and
 * V_SCROLL bits so that the SWT style will match the
 * widget that Windows creates.
 */
However this is too restrictive for some specific needs. I have a case
where a Tree component requires more control other the scrollbars,
namely in terms of positioning (SWT.RIGHT_TO_LEFT on Tree is not
enough).
In that case I would use a ScrolledComposite and listeners to adjust
the ScrolledComposite size and settings to provide scrolling support
for a Tree widget with the TVS_NOSCROLL bit set.

Not setting the TVS_NOSCROLL bit set causes some flickering when
specific
events happen since the Tree widget will display its scrollbar until a
new
size for the ScrolledComposite is set.

I'd like to avoid this flickering, and since setting the visibility of
the
Tree scrollbars will not work, my only current strategy is to change the
Tree widget implementation to set the TVS_NOSCROLL bit.

Are there any way to pass additional bit values for the widget, outside
of
private methods?

Best regards,
Olivier Modica.



Back to the top