Vertical scroll bar for SWT list widget

Below is my code:

Group leftGroup = new Group(parent, SWT.NONE); leftListWidget = new org.eclipse.swt.widgets.List(leftGroup, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI); leftListWidget.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); 

From the code above, although I added that if I added V_SCROLL AND H_SCROLL , it would add a horizontal and vertical scrollbar to my list widget. However, I do not see the scrollbar. When I increase the number of entries in the list, it simply increases the size (length) of the list. Is this a problem with scrolling OR with setting the length of the list widget?

+4
source share
1 answer

This is a list course in SWT !!!

You need to create your own widget (check http://www.snip2code.com/Snippet/11489/Custom-SWT-List-Box ) and control the scrollable components there.

+4
source

Source: https://habr.com/ru/post/1480958/


All Articles