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
Hi

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);
		
		//c1.setContent(menu_1.)
		//c1.setContent(menu_1);

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

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

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

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

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

		mntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);
		mntmNewItem_2.setText("Move");
Previous Topic:Menu On Button Click
Next Topic:Japanese Imperial Calendar support
Goto Forum:
  


Current Time: Tue Apr 23 16:00:41 GMT 2024

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

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

Back to the top