Print Page | Close Window

Problem Finding Command Bar

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=4372
Printed Date: 21 June 2025 at 8:46am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem Finding Command Bar
Posted By: dneilsen
Subject: Problem Finding Command Bar
Date Posted: 08 June 2006 at 12:47am
I am having a problem location a command bar

I load my 5 command bars from an xcb file and there are two command bars that I wish to delete if the user does not have certain admin privlidges.

I am using the following piece of code to iterate through all the command bars and delete the correct bars.


foreach(XtremeCommandBars.CommandBar myBar in Instance.axCommandBars1)
{
   if(myBar.BarID == ID.IDR_SUPERADMIN && !isSuperAdmin)
       myBar.Delete();
   if(myBar.BarID == ID.IDR_ADMINISTRATOR && !isAdmin)
       myBar.Delete();
}


Now, for some reason, this foreach loop only loops through four of my command bars.  The IDR_SUPERADMIN bar gets deleted but the IDR_ADMINISTRATOR bar, which most certainly exists, does not seem to be in the list?

Any idea on how this could occur?





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