Page 1 of 1

Hide/Unregister a component from designer toolBox

Posted: Fri Jan 04, 2008 2:42 am
by Jean-Philippe Roques
Hi,

I make an own derivated dataBand and register it. Now i have two dataBand in designer toolBox, mine and the original StiDataBand. I want to force user of designer to use mine derivated dataBand.

How can i hide the orginal StiDataBand from the toolBox ?

Thanks,
Jean-Philippe

Hide/Unregister a component from designer toolBox

Posted: Fri Jan 04, 2008 7:31 am
by Vital
You can use following code:

Code: Select all

Stimulsoft.Base.Services.StiServiceContainer services = StiConfig.Services.GetServices(typeof(StiComponent));
			
foreach (StiComponent component in services)
{
	if (component is StiDataBand)component.ServiceEnabled = false;
}
Thank you.

Hide/Unregister a component from designer toolBox

Posted: Tue Jan 08, 2008 3:42 am
by Jean-Philippe Roques
It works !

Thanks a lot Vital,

Jean-Philippe