G
Guest
Hi,
On my x64 Vista PC I am trying to find the index or value of the
WinForms CheckedListBox Item at the current mouse position after a
right click. First I tried using the Click event, but for
CheckedListBox it doesn't fire for a right click. The MouseDown
event fires, I can use the MouseEventArgs argument e.Y to find the
index of the Item, unless the CheckedListBox has been scrolled. I set
the VerticalScroll.Minimum=0; VerticalScroll.Maximum = Items.Count ==
110 for my current test. So far I have tried:
CheckedListBox.AutoScrollOffset.Y
Form.VerticalScroll.Value
Form.AutoScrollPosition.Y
All of these always return 0 regardless of the vertical scrollbar
position. Is there any way to find the index of a right clicked
CheckedListBox Item after vertical scrolling?
Thanks,
invegat
On my x64 Vista PC I am trying to find the index or value of the
WinForms CheckedListBox Item at the current mouse position after a
right click. First I tried using the Click event, but for
CheckedListBox it doesn't fire for a right click. The MouseDown
event fires, I can use the MouseEventArgs argument e.Y to find the
index of the Item, unless the CheckedListBox has been scrolled. I set
the VerticalScroll.Minimum=0; VerticalScroll.Maximum = Items.Count ==
110 for my current test. So far I have tried:
CheckedListBox.AutoScrollOffset.Y
Form.VerticalScroll.Value
Form.AutoScrollPosition.Y
All of these always return 0 regardless of the vertical scrollbar
position. Is there any way to find the index of a right clicked
CheckedListBox Item after vertical scrolling?
Thanks,
invegat