Hi,
I am using SmartClient Version: v8.2p_2012-04-02/LGPL Development Only (built 2012-04-02).
I am trying to make drag and drop menu item sorting. Here is my sample code, to illustrate basic code structure:
As far as I found - you can easily make draggable ToolStripButton (button1) item, but when I want to make the same functionality for item1 and item2 (which are items of submenu), then I can't find any suitable methods of doing it.
OK, I found one example: http://www.smartclient.com/smartgwt/showcase/#effects_drag_menu_grid
But when looking closer - this menu is not the same as normal menu, in this example there is menu created from datasource and it even doesn't contain valid menuitems, but list grid instead, so this is not a right method for me.
In conclusion, I am wondering - why there is no drag and drop support for typical menu items. Or maybe there is some workaround to do so?
I am using SmartClient Version: v8.2p_2012-04-02/LGPL Development Only (built 2012-04-02).
I am trying to make drag and drop menu item sorting. Here is my sample code, to illustrate basic code structure:
Code:
// menu ToolStrip toolstrip = new ToolStrip(); // 1st level buttons ToolStripButton button1 = new ToolStripButton("File", null); button1.setCanDrag(true); button1.setCanDrop(true); toolstrip.addButton(button1); // submenu Menu submenu = new Menu(); MenuItem item1 = new MenuItem("Button 1"); MenuItem item2 = new MenuItem("Button 2"); submenu.setItems(item1, item2); ToolStripMenuButton menuButton = new ToolStripMenuButton("Show menu", submenu); toolstrip.addMenuButton(menuButton);
OK, I found one example: http://www.smartclient.com/smartgwt/showcase/#effects_drag_menu_grid
But when looking closer - this menu is not the same as normal menu, in this example there is menu created from datasource and it even doesn't contain valid menuitems, but list grid instead, so this is not a right method for me.
In conclusion, I am wondering - why there is no drag and drop support for typical menu items. Or maybe there is some workaround to do so?
Comment