please can somebody point me in the direction of a really simple example of how to use an ultradropdownbutton.
all i need to do is create a dropdown button with three standard menu entries on it.
i've had a look at the sample app that comes with NetAdvantage 2008 vol 1 and its so overly complicated that i just don't seem to be able to get my head around it...
thanks in advance
Hi Chris,
The UltraDropDownButton needs some other control to provide the dropdown portion. So if you wat to drop down a menu, you will need to use an UltraToolbarsManager, as well.
So a simple case would be something like this:
Place an UltraDropDownButton and an UltraToolBarsManager on a form.
Right click on the ToolbarsManager and select "Customize.."
At the top of the designer is a row of tabs. Go to the Tools tab and add the tools (probably buttons) that you want to put on the menu.
Then select the PopupMenuToolDesigner tab. Here, you can create a popup menu and populate it with the items (buttons) you want.
Close the ToolBarsManager Designer and go to the DropDownButton and take a look at the PopupItem property. You can drop down a list here and it will display the names of all of the available PopupMenuItem in the toolbar, so you just pick the one you created.
To handle what happens when the user clicks a menu item, you use the ToolClick event of the ToolbarsManager.
Thanks Mike,
I've actually found another post on the forum which pretty much gives me what I need. I would reiterate that the sample provided is overly complex.
My next problem is how to add a menu seperator to the button popup menu that i've now created?
In that case, you would do something like this:
tool.InstanceProps.IsFirstInGroup = true;
i'm not using the designer since the popup menu entries are dynamic based on data content.
outside of the designer I cannot find any reference to a 'beginagroup' or 'begingroup' property on any control.
i've searched the controls, the online help and the KB. what 'begin a group' property are you talking aboutthanks for your help so far
Basically you need to set the Begin a Group property on the tool where you want the separator to appear. If you used the PopupMenuToolDesigner as I suggested, then you can just right-click on a tool and select the Begin a Group option on the menu.