PC Review


Reply
Thread Tools Rate Thread

Disabling ToolBoxItem in Vs ToolBox after some scanrio

 
 
sarahh
Guest
Posts: n/a
 
      16th Jan 2012
Hi,
I make a designer with Visual Studio 2010 and use also the Vs
ToolBox(adding custom controls) by the following:

IToolboxService toolBoxService =
(IToolboxService)Package.GetGlobalService(typeof(IToolboxService));
toolBoxService .AddToolboxItem(toolboxitem, category);
toolBoxService .Refresh();

After dropping specific toolboxitem control on the designer I need
that this item will be disabled (grayed out).

I have the following questions:
1. How could I disable toolboxitem, whereas other toolboxitem in it's
category remain enabled?
2. How I disable the dropping of this toolboxitem?

Thanks.
 
Reply With Quote
 
 
 
 
bradbury9
Guest
Posts: n/a
 
      17th Jan 2012
On 16 ene, 17:17, sarahh <cohen...@gmail.com> wrote:
> Hi,
> I make a designer with Visual Studio 2010 and use also the Vs
> ToolBox(adding custom controls) by the following:
>
> IToolboxService toolBoxService =
> (IToolboxService)Package.GetGlobalService(typeof(IToolboxService));
> toolBoxService .AddToolboxItem(toolboxitem, category);
> toolBoxService .Refresh();
>
> After dropping specific toolboxitem control on the designer I need
> that this item will be disabled (grayed out).
>
> I have the following questions:
> 1. How could I disable toolboxitem, whereas other toolboxitem in it's
> category remain enabled?
> 2. How I disable the dropping of this toolboxitem?
>
> Thanks.


Maybe you sould consider asking in the Visual Studio group, doesnt
seem a c# specific question. Check the
microsoft.public.vstudio.general

hope it helps
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:37 PM.