Home All Groups Group Topic Archive Search About

Q: Cancelling a combo dropdown

Author
21 Jun 2006 4:03 PM
G .Net
Hi

Is there a way to prevent the combo displaying its list of items when the
"combo arrow" is clicked?

The problem I'm trying to resolve is that depending on a Boolean value,
which is set according to other items on the form, I want to prevent the
combo from being used. I suppose I could set the combo to be disabled but
I'm wondering if there is something like

e.Cancel  = True

within a combo event which I could use?

Thanks in advance

Author
21 Jun 2006 4:25 PM
Ahmed
I remember I have done this once. You need to extend the combobox
control and override the WndProc method.

G .Net wrote:
Show quoteHide quote
> Hi
>
> Is there a way to prevent the combo displaying its list of items when the
> "combo arrow" is clicked?
>
> The problem I'm trying to resolve is that depending on a Boolean value,
> which is set according to other items on the form, I want to prevent the
> combo from being used. I suppose I could set the combo to be disabled but
> I'm wondering if there is something like
>
> e.Cancel  = True
>
> within a combo event which I could use?
>
> Thanks in advance
Author
23 Jun 2006 11:57 AM
C-Services Holland b.v.
G .Net wrote:
Show quoteHide quote
> Hi
>
> Is there a way to prevent the combo displaying its list of items when the
> "combo arrow" is clicked?
>
> The problem I'm trying to resolve is that depending on a Boolean value,
> which is set according to other items on the form, I want to prevent the
> combo from being used. I suppose I could set the combo to be disabled but
> I'm wondering if there is something like
>
> e.Cancel  = True
>
> within a combo event which I could use?
>
> Thanks in advance
>
>

If you don't want them to use it, disable it. Why would you need
something else? Hide it could be an option. Things you can't use that
aren't visible help the user to focus on what he can do.


--
Rinze van Huizen
C-Services Holland b.v