listbox focus

  • Thread starter Thread starter sf
  • Start date Start date
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
 
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
 
Back
Top