Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Problem Finding Command Bar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem Finding Command Bar

 Post Reply Post Reply
Author
Message
dneilsen View Drop Down
Newbie
Newbie


Joined: 18 April 2006
Location: Australia
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote dneilsen Quote  Post ReplyReply Direct Link To This Post Topic: Problem Finding Command Bar
    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?


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.