Hi
Im not sure if the following is possible. I currently have a popup menu which can have a single optiion or many. For example I have a "Create Record" menu. In some situations (driven by data) there are many different ways to create a record so we have "create record" as a popup with the options. I have made this a segmented popup so that a click of the popup menu means a selection of the first button in the popup's tools collection.
That works well. In many situations there is only a single option and it is something generic. For example the single button tool under "Create Record" is "Create Record". I would like to make this single button invisible so that the "Create Record" popup menu looks and behaves like a button. I can get this working nicely as long as I set Visible to FALSE on the button and the button is enabled.
I have made the popup segmented so this works and stopped the dropdown arrow from doing anything with a beforetooldropdown event. How do I get rid of the popup arrow altogether? I want to be able to get rid of it in these sutuations. Is this possible with a drawfilter? Settings the dropdownarrowstyle to None seems to imply Standard and anythig other than segmented does not raise a toolclick event on the popup which I need to emulate a button.
Any help is greatly appreciated.
Thanks
Darren
Its partially working. My form is an mdi child form and it wasn't even firing at all when I attached the creation filter to the forms ultratoolbarsmanager control. I believe it probably wasn't working due to the mdi merging stuff.
As soon as I attached it to the mdiparent, I started seeing some changes. The drop down arrows have disappeared on the ribbon. They are however still there using your code on the popup menu which are attached to a grid control.
is that something that makes sense?
Is there a way of detecting what its firing for? I was looking at something which points back to the popupmenutool from the uielement but I cant find anything. I did put some messages out and I can see it firing.
Darren,
But it does work in the sample that I attached, doesn't it? Could you put together a sample that demonstrates this CreationFilter not firing for the ArrowUIElement and attach it to this thread so that I could look at it and see if I can make it work for you?
I'm afraid it doesn't work. Sorry for the delay in getting back to you.
After attaching a creationfilter to the toolbar, the creation does not fire for the arrowuielement etc.
Have you been able to get it to work?
OK, let me know how it goes.