|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Deriving Combobox items indexesTo anyone who might be able to help.
I'm trying to derive the index of any random item in a populated combobox dropdownlist when the mousepointer is over the item. Seems to me it should be possible since the item "highlights" when the mouse passes over the different items listed, but the end user hasn't yet "clicked/selected" any specific item. I know it can be done with a listbox. Basically looking for the LB_ITEMFROMPOINT equivalent for Comboboxes. Does anyone have any idea how to accomplish this with a combobox? Please help. Easton,
Any reason that you want to do this, it sound for me forever stupid that people want to confrontate users with non standard behaviour. Something from the 80's in the previous century. Cor Show quoteHide quote "Easton" <Eas***@discussions.microsoft.com> schreef in bericht news:5254EA53-028F-4A16-BD71-F925C4168C1D@microsoft.com... > To anyone who might be able to help. > > I'm trying to derive the index of any random item in a populated combobox > dropdownlist when the mousepointer is over the item. Seems to me it > should > be possible since the item "highlights" when the mouse passes over the > different items listed, but the end user hasn't yet "clicked/selected" any > specific item. I know it can be done with a listbox. Basically looking > for > the LB_ITEMFROMPOINT equivalent for Comboboxes. Does anyone have any > idea > how to accomplish this with a combobox? Please help. Yes, my application would use the index to derive a preview of information to
help the end user make the best possible choice from the combobox. Show quoteHide quote "Cor Ligthert [MVP]" wrote: > Easton, > > Any reason that you want to do this, it sound for me forever stupid that > people want to confrontate users with non standard behaviour. Something from > the 80's in the previous century. > > Cor > > "Easton" <Eas***@discussions.microsoft.com> schreef in bericht > news:5254EA53-028F-4A16-BD71-F925C4168C1D@microsoft.com... > > To anyone who might be able to help. > > > > I'm trying to derive the index of any random item in a populated combobox > > dropdownlist when the mousepointer is over the item. Seems to me it > > should > > be possible since the item "highlights" when the mouse passes over the > > different items listed, but the end user hasn't yet "clicked/selected" any > > specific item. I know it can be done with a listbox. Basically looking > > for > > the LB_ITEMFROMPOINT equivalent for Comboboxes. Does anyone have any > > idea > > how to accomplish this with a combobox? Please help. > > > Easton wrote:
> I'm trying to derive the index of any random item in a populated combobox If you create a Control derived from ComboBox, make it OwnerDrawn and > dropdownlist when the mousepointer is over the item. Seems to me it should > be possible since the item "highlights" when the mouse passes over the > different items listed, but the end user hasn't yet "clicked/selected" any > specific item. override the DrawItem method, you should be able to pick out the currently "hovered" item based on each item's style. (IIRC, the item's index is passed as part of the Event Arguments). Not something to take on lightly, but it you /really want to... Regards, Phill W. Thank you Phill, I've been headed in that direction as well. Would you
happend to know what event I should be watching? Show quoteHide quote "Phill W." wrote: > Easton wrote: > > > I'm trying to derive the index of any random item in a populated combobox > > dropdownlist when the mousepointer is over the item. Seems to me it should > > be possible since the item "highlights" when the mouse passes over the > > different items listed, but the end user hasn't yet "clicked/selected" any > > specific item. > > If you create a Control derived from ComboBox, make it OwnerDrawn and > override the DrawItem method, you should be able to pick out the > currently "hovered" item based on each item's style. (IIRC, the item's > index is passed as part of the Event Arguments). > > Not something to take on lightly, but it you /really want to... > > Regards, > Phill W. >
Database Connectivity
Report Layout Which is the better construct? insert key state Foreign letters in text file Specifiy that i'm referring to a class, not a member PrintDocument and HasMorePages issue StringReaders and DataWriters and FileStreams, oh, my! Error "Unable to cast object of type"-- but types are the same! bypass security in Outlook |
|||||||||||||||||||||||