mainFrameBarManager

I'm trying to get a handle on barItems so I can change their visible property. mainFrameBarManagerRT.GetBarItemFromBarItemID always returns a null reference. Here's the code (rmir.BarItemID is a string holding the value of a BarItem's ID property): if (rmir.Visible == true) { BarItemID id = new BarItemID(); id.barItemID = rmir.BarItemID; BarItem bi = mainFrameBarManagerRT.GetBarItemFromBarItemID(id); if (bi != null) bi.Visible = true; } Is this method supposed to find a BarItem object based on the string value? Is there a better way to search for a specific BarItem object based on its ID?

2 Replies

AS Arun Srinivasan Syncfusion Team November 12, 2003 06:16 PM UTC

Hi Ken Here is what you could try to get it working: //Open is a known id for a baritem BarItem bi = this.mainFrameBarManager1.Items.FindItem("Open"); bi.Visible = false; Regards Arun


KL Ken Law November 13, 2003 03:37 PM UTC

Thanks, that works as expected. I'm still curious why there is a BarItemID class and the GetBarItemFromBarItemID method. For future or internal use?

Loader.
Up arrow icon