Skip to main content

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:Japanese Imperial Calendar support
Goto Forum:

Current Time: Sun Jun 17 22:37:52 GMT 2018

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

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

Back to the top