[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.buildingcontrols

Disabling ToolBoxItem in Vs ToolBox after some scanrio

sarahh

1/17/2012 8:15:00 AM

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.
5 Answers

Peter Nilsson

11/5/2009 11:13:00 PM

0

Seebs <usenet-nos...@seebs.net> wrote:
> Tim Streater <timstrea...@waitrose.com> wrote:
> > In the context:
> > > Why would you offer advice in group of C specialists
> > > if you only "think" that's what you used to do?
> >
> > Why shouldn't I? If I'm wrong, (certainly not excluded,
> > see above) then I expect I'll be corrected by those who
> > know better.
>
> And this is why the status-weenies are idiots. They
> actually can't conceive of you doing something in order
> to learn or develop,

Of course, we all learn through intelligent discourse,
but it's not particularly productive, educationally or
professionally, to be sloppy because you _expect_ others
to clean up after you.

'If I'm wrong people will correct me' is an attitude
that invariably places a burden on others to actually
do so. At the very least it is taking people for granted.

Asking questions is more conducive to development
than giving careless answers, whether qualified as
recollections or not.

--
Peter

Seebs

11/5/2009 11:53:00 PM

0

On 2009-11-05, Peter Nilsson <airia@acay.com.au> wrote:
> Of course, we all learn through intelligent discourse,
> but it's not particularly productive, educationally or
> professionally, to be sloppy because you _expect_ others
> to clean up after you.

Not in general.

> 'If I'm wrong people will correct me' is an attitude
> that invariably places a burden on others to actually
> do so. At the very least it is taking people for granted.

In general, I might agree, but as it was already pointed out, Tim
went out of his way to highlight that his memory might be unreliable
in this matter.

> Asking questions is more conducive to development
> than giving careless answers, whether qualified as
> recollections or not.

If the only people giving answers are the ones who are totally certain
that they're right, we'll get a lot of very poor answers.

-s
--
Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
http://www.seeb... <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/...(Scientology) <-- get educated!

Nick Keighley

11/6/2009 9:39:00 AM

0

On 5 Nov, 19:39, Richard Heathfield <r...@see.sig.invalid> wrote:
> In <slrnhf6733.42i.usenet-nos...@guild.seebs.net>, Seebs wrote:
> > On 2009-11-05, Tim Streater <timstrea...@waitrose.com> wrote:


> >> Why shouldn't I? If I'm wrong, (certainly not excluded, see above)
> >> then I expect I'll be corrected by those who know better.

I still seems odd to give advice to newbies that is actually wrong. I
sometimes post stuff I don't know to be correct just so I can test the
waters. But if it went to a newbie I'd try to label it as tentative.
In front of experts I'd just say it.

> > And this is why the status-weenies are idiots.  

for someone who doesn't understand status you don't half go on about
it...

> > They actually can't
> > conceive of you doing something in order to learn or develop, but
> > which could result in a temporary decline in other peoples'
> > perception of you.

never bothered me very much. Similarly I don't take the mick out of
people who don't know things I do (we're all ignorant about
something). The people who bug me are what I call the willfully
ignorant. It's not that they don't know something but that they don't
know something and pretend they do and won't be corrected.

> Why would making a mistake result in a temporary decline in other
> people's perception of you? I don't see that at all.

Seebs

11/6/2009 9:57:00 AM

0

On 2009-11-06, Nick Keighley <nick_keighley_nospam@hotmail.com> wrote:
>> In <slrnhf6733.42i.usenet-nos...@guild.seebs.net>, Seebs wrote:
>> > And this is why the status-weenies are idiots. ?

> for someone who doesn't understand status you don't half go on about
> it...

I can model it well enough to explain it and describe its effects, I just
don't have the experience. I dislike people who insist that I'm actually
motivated by something I don't experience. (It's IMPORTANT. Someone
is WRONG on the INTERNET.)

> never bothered me very much. Similarly I don't take the mick out of
> people who don't know things I do (we're all ignorant about
> something). The people who bug me are what I call the willfully
> ignorant. It's not that they don't know something but that they don't
> know something and pretend they do and won't be corrected.

Yeah. That can be either fascinating, horrifying, or funny, but is also
nearly always annoying. (I've been watching a particularly beautiful
case of it descend into madness, as someone who guessed wrong on a
physics brainteaser has spent months defending an ever stupider position,
and is now at a point where, to preserve his ego, he has to deny pretty
much the last four hundred years of basic physics. It's maddening,
and yet, strangely awe-inspiring to watch.)

-s
--
Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
http://www.seeb... <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/...(Scientology) <-- get educated!

phaedrus

11/6/2009 7:22:00 PM

0

Okay, thanks to everyone. I think I can see where I was going wrong
now!

P.