Page 1 of 1
disable designer toolbox items
Posted: Wed Apr 17, 2013 11:47 am
by paullef
hello,
How can I (using code, not the customize screen) disable certain items in the toolbox like components and bands, who are already accessible through the dropdown menu in the same toolbox.
Thanks
Paul
Re: disable designer toolbox items
Posted: Thu Apr 18, 2013 8:09 am
by HighAley
Hello, Paul.
paullef wrote:How can I (using code, not the customize screen) disable certain items in the toolbox like components and bands, who are already accessible through the dropdown menu in the same toolbox.
Do you want to disable them at all or just remove from the toolbox and left on the dropdown menu?
Thank you.
Re: disable designer toolbox items
Posted: Thu Apr 18, 2013 1:07 pm
by paullef
Only to remove them from the toolbox and leave them in the dropdown menu (to shorten the toolbox).
Thanks
Paul
Re: disable designer toolbox items
Posted: Fri Apr 19, 2013 9:46 am
by HighAley
Hello, Paul.
paullef wrote:Only to remove them from the toolbox and leave them in the dropdown menu (to shorten the toolbox).
You could to it with the Toolbox Setup. Please, look at the attached image.
Thank you.
Re: disable designer toolbox items
Posted: Fri Apr 19, 2013 1:39 pm
by paullef
I understand this, but I want to do it using code, not giving the user the opportunity, so how can I disable these without the customize screen?
Thanks
Paul
Re: disable designer toolbox items
Posted: Mon Apr 22, 2013 12:07 pm
by HighAley
Hello.
You can do it with next code. It's an example how to remove Cross-tab.
Code: Select all
Stimulsoft.Base.Services.StiServiceContainer components = StiConfig.Services.GetServices(typeof(StiComponent));
foreach (StiComponent component in components)
{
if (component.ComponentId == StiComponentId.StiCrossTab)
{
component.PlaceOnToolbox = false;
}
}
Thank you.