disable toolbars from NDiagramCommandBarsManager


Author
Message
Hans Henrik Friis Pedersen...
Hans Henrik Friis Pedersen
Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)
Group: Forum Members
Posts: 28, Visits: 136
Hi,

I would like to disable a number of toolbars in Designmode. If I right click on the NDiagramCommandBarsManager and choose "Show Editor" I can disable the different Toolbars. However, when I'm in Runtime, the disabled toolbars seem to re-appear.

How do I make the different toolbars disappear or ".visual = false;"
How can I in runtime make the different toolbars disappear - I have tried to use

nDiagramCommandBarsManager1.Toolbars.


but I do not know how to locate for instance the "Tools" toolbars and inactive that toolbar...


Reply
Hans Henrik Friis Pedersen...
Hans Henrik Friis Pedersen
Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)
Group: Forum Members
Posts: 28, Visits: 136
Hi,

I'm afraid the example you stated is of very little help. However, I worked it out my self.

Use the following code; Make sure that the mentioned code is AFTER initilizeComponent:


InitializeComponent();   
//MessageBox.Show(nDiagramCommandBarsManager1.Toolbars[0].ToString() );   
nDiagramCommandBarsManager1.Toolbars[0].Visible = false;   
nDiagramCommandBarsManager1.Toolbars[3].Visible = false;   
nDiagramCommandBarsManager1.Toolbars[4].Visible = false;   
nDiagramCommandBarsManager1.Toolbars[5].Visible = false;   
nDiagramCommandBarsManager1.Toolbars[6].Visible = false;   
nDiagramCommandBarsManager1.Toolbars[7].Visible = false;


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search