Disabling ToolBoxItem in Vs ToolBox after some scanrio

Discussion in 'ASP .Net Building Controls' started by sarahh, Jan 17, 2012.

  1. sarahh

    sarahh Guest

    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.
     
    sarahh, Jan 17, 2012
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Mad Scientist Jr
    Replies:
    1
    Views:
    752
    Eliyahu Goldin
    Jun 29, 2004
  2. Praveen Ramesh

    Custom ToolBoxItem type:

    Praveen Ramesh, Apr 14, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    2,872
    Praveen
    Apr 21, 2005
  3. Replies:
    3
    Views:
    4,809
    Juan T. Llibre
    Nov 29, 2005
  4. Michael Groeger
    Replies:
    2
    Views:
    660
    Michael Groeger
    Jan 20, 2006
  5. Tony Morris
    Replies:
    3
    Views:
    1,152
    Roedy Green
    Feb 4, 2006
  6. JFL
    Replies:
    0
    Views:
    534
  7. Xavier Serrand

    disabling warnings for some include

    Xavier Serrand, Aug 31, 2007, in forum: C Programming
    Replies:
    1
    Views:
    478
    Ian Collins
    Aug 31, 2007
  8. Sudhir Pai

    Disabling some of the days in a Calender

    Sudhir Pai, Jul 21, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    267
    Ken Cox [Microsoft MVP]
    Jul 21, 2003
Loading...