Print Page | Close Window

How to remove control from QAT

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=15293
Printed Date: 04 May 2024 at 8:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to remove control from QAT
Posted By: rdhd
Subject: How to remove control from QAT
Date Posted: 02 October 2009 at 5:26pm
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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net