I have right-clicked on a group and added it to the QAT. Later I need to remove the commands that were part of that group. I get the CXTPRibbonQuickAccssControls collection and I have to call FindControl using the recursive flag passing in the command ID of the command I am currently removing. I get the control. How do I remove the control from the CXTPRibbonQuickAccessControls?
I tried calling the Remove method of the QA controls. But the remove does not recurse so it fails to find the control it just fed me  . So I tried calling IndexOf. But IndexOf returns -1 (because it does not do the recursion either). So I cannot call the Remove( int Index ) method.
So how do I remove such a control that is in the ribbon group control popup that was added to the QAT?
I also need to remove the ribbon group control popup too because, as I posted earlier, when I programatically remove the group I originally added to the QAT, the QAT leaves the ribbon group popup in place and if the user touches it, CodeJock crashes our application because the popup stores, without addreffing, the original group pointer and that group was removed and deleted! I have looked extensively at the control the QA controls finds but no where do I see the group control popup pointer I see in the QA controls array. I found a pointer to an instance of that class, but the pointer value is not the same.
|