Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Scrollable Menu
Scrollable Menu [message #783426] Wed, 25 January 2012 12:40
Eclipse UserFriend
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: Sun Aug 31 01:15:43 EDT 2025

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

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

Back to the top