listbox focus

S

sf

Hi,
searching this group and othher sources didn't found a match.
My problem:
Working with VS C#.Net 2003
I have a ListBox and like to retrieve the item which has the focus -
not the selected one.
In singleselection ListBox its mostly the same, thus the selection
follows the focus.
But in multiselection focus can be moved without changing any
selection.
Is there any easy way to be informed abaout the focus change?
(I think the hard way would be to add a focus event handler to each
item added in the ListBox)
TIA
 
S

sf

Hi,
1. Tried to implement the 'hard way'. But how can I access the control
of the ListBox item to add an event handler?
2. Found another way:
because I use owner drawing for other purposes, I check the focus state
of DrawItemEventArgs and if it's set, take the additional information
for that item.
But still I'm interested in my original question.
Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top