Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Scrollable Menu
Scrollable Menu [message #783426] Wed, 25 January 2012 17:40
swt_user swt_user is currently offline swt_user swt_userFriend
Messages: 3
Registered: January 2012
Junior Member

I want to create a menu on the click of button and it should be scrollable. I can make the menu visible true on button click. But how to make it scrollable.

ScrolledComposite setcontent method take object of type control.

Please see the code snippet below.

Any pointers..

                 menu_1 = new Menu(btnNewButton_1);
		ScrolledComposite c1 = new ScrolledComposite(menu_1.getShell(), SWT.BORDER| SWT.H_SCROLL | SWT.V_SCROLL);

		mntmNewItem = new MenuItem(menu_1, SWT.None);

		mntmNewItem_1 = new MenuItem(menu_1, SWT.NONE);

		mntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);

		mntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);
		mntmNewItem_2.setText("Remove All");

		mntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);

		mntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);
Previous Topic:Menu On Button Click
Next Topic:Browser and PDF
Goto Forum:

Current Time: Fri Oct 20 23:50:02 GMT 2017

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

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