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.
Mike Dour"]This might help get you started:
Do these steps still work with v8.1? I have just upgraded my project from infragistics v7.3 to v8.1, as well as from VS2005 to VS2008, and it seems the above steps no longer work, even on a form which was previously working (I hadnt changed it - just upgraded it).
--- EDIT ---
Just had a quick look at an older version in which I had only upgraded Infragstics (not visual studio) - this one doesnt work either. An even older (compiled and installed on another computer) version which uses infragstics 7.3 works just fine.
I believe everything in 8.1 should work as it did in 7.3. Which steps are no longer working correctly?
Mike Dour"]I believe everything in 8.1 should work as it did in 7.3. Which steps are no longer working correctly?
The step at the end where you run the application, and you click on the drop down. For me, in 7.3, it dropped down. With 8.1, it does not. All of the steps in building it appeared to work.
I would ordinarily attribute this to me doing a step wrong, but I had made a drop down menu thing previously (in 7.3, which worked), which no longer works in 8.1 (I have made no changes - just upgraded Infragistics).
Make sure all references in your project are for 8.1. If you have mixed references (some for 7.3 and some for 8.1), it could cause this issue. If not, this is definately a bug and I would recommend submitting it to the support group: http://ko.infragistics.com/gethelp.
There are no references to 7.3 in this project.
It seems odd that such a bug has gotten through, as I cant see the usage of these drop down menus being rare. I'll go submit this now...
Oh, I have reported it (to support). Their response was a matter of fact "Oh, this is how you have to do that".
An excerpt from their response:
" This is interesting scenario, and the trick is that you have created a popup menu for the child form, and when you display the child form as MDI parent, it contains popup menu but it does not correspond with the parent form, in other words the parent does not have a popup menu item - it should and the key must match. On the other hand when you display non-MDI form, it has no tie with the parent, and therefore it displays its own popup menu. You need to set up a popup menu item on the parent so it can relate with the child form. Keep in mind that the keys of popup items must match. "
Not the slightest indication that this is a bug.
I don't think its a feature. You would be able to show a merged menu in the parent manager by calling ShowPopup if it was defined only on the child and not the parent, so you should be able to show it with an UltraDropDownButton as well. I would recommend reporting it.
Apparently its not a bug - its a feature. If you put a popupmenu in the mdi container form, with the same name (I think key) as the one you use in your mdichild form, it starts working. From what I can tell, the logic is it will combine the two (from the main menu and child menu) into a single popup menu. I've now just created a bunch of blank popups in my main (parent) form, with the generic names PopupMenuTool1, PopupMenuTool2, etc, and make sure I use those same names in the child forms. I'm sure this must be convenient for some people - just not myself.
i have the same problem. I used the ig controls from 2006 volume 2. Now I upgraded to version 2008 volume 1 and the popup is no longer shown. when can we get a fix?
I see now. I think I misunderstood your original post stating the problem. So I apologize for the unneccessary back and forth about the version numbers. This is actually not the problem. I though you were stating that the last of my steps for defining an UltraDropDownButton (where you drop down the list of PopupItems and select the menu) was no longer working. I see now that the UltraDropDownButton was not dropping down the menu at run-time. I have checked and you are correct, it is because the form is an MdiChild. If a drop down button uses a popup menu from a toolbars manager which is merged into an mdi parent's toolbars manager, the drop down button can no longer show the popup. But it should be showing the merged popup menu from the parent's toolbars manager in this case.