-
Combo Box problem
I have created application that uses a combo box to display a list of names.
I have added code to the double click event to display a popup menu, however,
when I run my app and double click on a item in the combo drop down listbox
nothing happens. What's happening here?
Darryl Moore
-
Re: Combo Box problem
Hi Darryl --
"Darryl Ray" <Darryl.R.Moore@eds.com> wrote in message
news:3a89a8fa$1@news.devx.com...
>
> I have created application that uses a combo box to display a list of
names.
> I have added code to the double click event to display a popup menu,
however,
> when I run my app and double click on a item in the combo drop down
listbox
> nothing happens. What's happening here?
>
> Darryl Moore
To be honest with you, I'm not sure why there's a double-click event for a
combo box, but you're right, it doesn't fire. Maybe there's something I'm
not thinking about - I dunno. Instead, why don't you put your code in the
click-event?
Matt
-
Re: Combo Box problem
"Matt Markus" <matt_markus@hotmail.com> wrote in message
news:3a89b258$1@news.devx.com...
> Hi Darryl --
>
> "Darryl Ray" <Darryl.R.Moore@eds.com> wrote in message
> news:3a89a8fa$1@news.devx.com...
> >
> > I have created application that uses a combo box to display a list of
> names.
> > I have added code to the double click event to display a popup menu,
> however,
> > when I run my app and double click on a item in the combo drop down
> listbox
> > nothing happens. What's happening here?
> >
> > Darryl Moore
>
> To be honest with you, I'm not sure why there's a double-click event for a
> combo box, but you're right, it doesn't fire. Maybe there's something I'm
> not thinking about - I dunno. Instead, why don't you put your code in the
> click-event?
>
The Click event fires when you select an item from the drop-down list so a
double-click would have to mean that you selected another item really
quickly... if MS had added a "SelectionChanged" event instead of co-opting
Click then it'd make more sense to have a DoubleClick.
-
Re: Combo Box problem
> I have created application that uses a combo box to display a list of
> names.
> I have added code to the double click event to display a popup menu,
> however,
> when I run my app and double click on a item in the combo drop down
> listbox
> nothing happens. What's happening here?
>
> Darryl Moore
The DblClick event fires when the user double clicks the selected item in
the text box portion of the combobox. Double clicking on an item in the
dropdown list is impossible as the single click event fires first which
makes the clicked item the active item in the combobox. If you need a
popup menu to appear while the list is down, I recommend using the mouse
down event. I make my popup menus appear on right click which is as simple
as testing if Button = 2 in the event code. The only problem with this
approach (possibly, I don't know what your using this for) is that when
the user right clicks on the item, it is not selected. If you need to
know which item has been right clicked then this could present a problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks