I'm wondering how I create a drop down menu button using Infragistics? (That is, the user hits a button, a number of options drop down, such as Save, Delete, Print, and the user can select one).
I think I have to use an UltraDropDownButton and an UltraToolbarsManager together somehow, but I cant for the life of me work it out. I think the WinMisc-Basic Features sample has what I'm after, but I'm having trouble working it out from that example.
Can anyone offer a few pointers?
Thanks.
This might help get you started:
1. Add an UltraToolbarsManager to your Form
2. Right-click on the toolbars manager in the component tray and select 'Customize...'
3. Click the 'Tools' tab in the customize dialog.
4. Click the 'New' button and add a in the tool type combo, select 'Popup Menu'
5. Specify a key to identify the menu (don't worry about the caption as it will not be seen) and click 'Add'
6. Change the tool type to 'Button' (or any other type of item you want in your drop down).
7. Add the tools you want to be seen in your drop down the same way you added the popup menu.
8. Click 'Close' on the 'New Tool' dialog
9. Select the 'PopupMenuTool Designer' tab on the customize dialog.
10. In the 'Current Menu' drop down, select the popup menu added in step 5.
11. Drag the tools you want in your drop down from the 'Available Tools' section to the section on the left.
12. Click 'Close' in the customize dialog
13. Add an UltraDropDownButton to the Form and select the new button.
14. In the VS property grid, drop down the arrow for the PopupItem property and select the popup menu added in step 5.
Basically, steps 1-12 deal with defining a drop down menu. The last two steps deal with how to use that menu in a separate drop down control.
This is ridiculous...
My project is very large and since we do deployments over the web we don't want it getting any bigger than it must be.
We already have the Win.Misc.Dll included in our project, and so i thought hey this is great... that dropdownbutton is exactly what i need and i can use it without needing any extra Dlls.
Obviously i'm wrong, because it seems to me that the dropdownbutton is useless without the ultratoolbarsmanager, which is another Dll altogether.
This is really disappointing. The control is exactly what i need but i cant use it because you need to add additional dll's to your project to actually use it, which we can not afford. Why cant there just be a .Items collection for those of us that don't need fancy infragistics menus?
You do not need to use a PopupMenuTool from the toolbars assembly as the PopupItem for an UltraDropDownButton. You can use anything that implements the IPopupItem interface. We provide two implementations of this interface:
1) PopupToolBase - Create a drop down from any type of drop down tool in the toolbars assembly.
2) UltraPopupControlContainer - Create a drop down from any control on your form.
The UltraPopupControlContainer is defined in Misc, so you will not need to include any other dll, but unfortunately it does not let you specify the items as you would like. Here are some options you can try:
1. Create a custom control that displays items and use that in the UltraPopupControlContainer
2. Derive a class from an existing menu type and implement IPopupItem on you class. Use an instance of the class as the PopupItem in the UltraDropDownButton. Here are some menu types that you can try to derive from:
a) System.Window.Forms.ContextMenu
b) Infragistics.Win.IGControls.IGContextMenu (a derived ContextMenu in the Win dll)
c) Infragistics.Win.ValueList (also in the Win dll)
contact said: Thanks for the reply. I dont have enough time to go to those lengths in order to display a menu though. I really think you guys should have easier ways of doing these things... An items collection aswell as your fancy infragistics popup menu would have been great.
Thanks for the reply. I dont have enough time to go to those lengths in order to display a menu though. I really think you guys should have easier ways of doing these things... An items collection aswell as your fancy infragistics popup menu would have been great.
I would recommend submitting a feature request for this to the support group: http://devcenter.infragistics.com/Protected/RequestFeature.aspx.
Mike Dour"] You do not need to use a PopupMenuTool from the toolbars assembly as the PopupItem for an UltraDropDownButton. You can use anything that implements the IPopupItem interface. We provide two implementations of this interface: 1) PopupToolBase - Create a drop down from any type of drop down tool in the toolbars assembly. 2) UltraPopupControlContainer - Create a drop down from any control on your form. The UltraPopupControlContainer is defined in Misc, so you will not need to include any other dll, but unfortunately it does not let you specify the items as you would like. Here are some options you can try: 1. Create a custom control that displays items and use that in the UltraPopupControlContainer 2. Derive a class from an existing menu type and implement IPopupItem on you class. Use an instance of the class as the PopupItem in the UltraDropDownButton. Here are some menu types that you can try to derive from: a) System.Window.Forms.ContextMenu b) Infragistics.Win.IGControls.IGContextMenu (a derived ContextMenu in the Win dll) c) Infragistics.Win.ValueList (also in the Win dll)