J
joseph.inglis
Hi group,
Someones gonna answer this in two seconds flat but im tearing my hair out.
Create a form, add a listview, add 5 items and programmatically select item
at index 3.
this.imageList.Items[3].EnsureVisible();
this.imageList.Items[3].Selected = true;
That works fine. Use the mouse to select index 4 and again, works sweetly.
Whats happening in the above scenario is that the mouse index is still set
to 0. From application start and setting to index 3 as stated... the first
time i press down arrow key the KeyUp event reports index 1.
lastIndex= imageList.SelectedItems[0].Index;
Thats right eh. The mouse index is still at 0... as i press the down key,
the image list quickly selects index 1 just before the keyup event fires and
this is correctly reporting index 1. The image list does infact quickly
select index 1 (it turns blue) just before the key up event... why and how
can i stop/prevent/work around this?
Am stuck
Tam
Someones gonna answer this in two seconds flat but im tearing my hair out.
Create a form, add a listview, add 5 items and programmatically select item
at index 3.
this.imageList.Items[3].EnsureVisible();
this.imageList.Items[3].Selected = true;
That works fine. Use the mouse to select index 4 and again, works sweetly.
Whats happening in the above scenario is that the mouse index is still set
to 0. From application start and setting to index 3 as stated... the first
time i press down arrow key the KeyUp event reports index 1.
lastIndex= imageList.SelectedItems[0].Index;
Thats right eh. The mouse index is still at 0... as i press the down key,
the image list quickly selects index 1 just before the keyup event fires and
this is correctly reporting index 1. The image list does infact quickly
select index 1 (it turns blue) just before the key up event... why and how
can i stop/prevent/work around this?
Am stuck
Tam