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.
Bit more research. I created a new project in VS2008/Infragistics 8.1, and this one works fine. The dropdownbutton works the way it should. So it seems it is just my development project.
I just did a search for 7.3 in my whole solution, and the only occurance was in the app.config file. I removed the following portion, which had no effect (dropdownbuttons still arnt working)
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Infragistics2.Win.UltraWinEditors.v7.3" publicKeyToken="7DD5C3163F2CD0CB" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-7.3.20073.1041" newVersion="7.3.20073.1041"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Infragistics2.Win.UltraWinGrid.v7.3" publicKeyToken="7DD5C3163F2CD0CB" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-7.3.20073.1041" newVersion="7.3.20073.1041"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Infragistics2.Shared.v7.3" publicKeyToken="7DD5C3163F2CD0CB" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-7.3.20073.1041" newVersion="7.3.20073.1041"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Infragistics2.Win.Misc.v7.3" publicKeyToken="7DD5C3163F2CD0CB" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-7.3.20073.1041" newVersion="7.3.20073.1041"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="Infragistics2.Win.v7.3" publicKeyToken="7DD5C3163F2CD0CB" culture="neutral"/> <bindingRedirect oldVersion="0.0.0.0-7.3.20073.1041" newVersion="7.3.20073.1041"/> </dependentAssembly> </assemblyBinding> </runtime>
The only other thing I can think of to determine whether or not separate versions are getting loaded is the following:
1. Open two instances of VS2008
2. Open your project in the first instance
3. Open the designer for the form having the problem
4. Minimize this instance of VS2008
5. On the second instance of VS2008, go to Debug > 'Attach to Process...' (or Ctrl+Alt+P by default)
6. Select the instance of VS2008 (the process name is 'devenv.exe') that has your project open
7. In the 'Attach To' box, make sure 'Managed' is one of the comma delimited items. If not, click the 'Select...' button and choose it manually.
8. Click 'Attach'
9. When the dialog closes, go to Debug > Windows > Modules (or Ctrl+D,M by default)
After all the modules are loaded, make sure all Infragistics dlls have the same version. If not, reply with the names of the dlls that differ and I might be able to help determine why they are different.
They are all the same version (8.1.20081.1000), except for two - Infragistics.Office2007UI.Design.Support.v8.1.dll (v1.0.0.0) and Infragistics.Licence.dll (v1.0.5005.10)
fweeee said: They are all the same version (8.1.20081.1000), except for two - Infragistics.Office2007UI.Design.Support.v8.1.dll (v1.0.0.0) and Infragistics.Licence.dll (v1.0.5005.10)
The two having different versions are ok. As long as Infragistics2.Win, Infragistics2.Win.Misc, and Infragistics2.Win.UltraWinToolbars have the same version, it isn't the problem. It sounds like there is something else about this one project causing the issue. If you haven't done so already, and if its possible, you should submit that specific project to the support group. I would also let them know which versions of the product are currently installed on your system.
Mike Dour"]If you haven't done so already, and if its possible, you should submit that specific project to the support group.
Thanks, I have just done this. In the process of removing all of the irrelevant stuff from my project, I made an important discovery. This issue only occurs if the form is an MdiChild - that is, the MdiParent property of the form is set before it is shown.
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.