Which item is highlighted in Combo box dilema

jeremyr

New member
Local time
Today, 18:20
Joined
Mar 24, 2008
Messages
4
I have a multi select combo box.
When someone clicks on an item in this combobox it is highlighted.
Here is the problem:

If someone click on an item (lets call it item1) and then drags the mouse to another item (lets say item7) before letting go of the mouse button, then two things happen:
  • item1 becomes highlighted
  • item7 becomes the answer to Ctrl.ListIndex
I need to know which item was highlighted (in this case item1). If I can't use Ctrl.ListIndex to find out what it is, what can I use?

Has anyone else had this problem? I am banging my head against the wall.
Thanks
 
Simple Software Solutions

Are you sure you are not talking about list boxes? Combo boxes do not have a multi select property?

If it is a list box make sure that the setting is set to simple and not extended.

Extended allows mouse dragging whereas simple doesn't.

CodeMaster::cool:
 
Correction but still an issue

Thanks DCrake,

Yes I meant list boxes (I realised this mis-wording after I went to bed).

I was wishing to use extended as I want the user to select multiple items in the box. (Some code runs with each onclick event to process their immediate selection and some more code runs processing all of their selctions when they click on a command button).
As long as the user doesnt drag the mouse it works great.

so the problem remains:
How do I tell which item is highlighted? or How can a put in some code before it highlights it?:confused:
 

Users who are viewing this thread

Back
Top Bottom