Hi,
in normal Listbox there's a function called IndexFromPointi.
This function received the position of mouse cursor (X and Y) and return the index of listbox
This function is not present in RadListBox ?
Thanks,
Marco Bianchi
1 Answer, 1 is accepted
0
Angel
Telerik team
answered on 11 Aug 2008, 09:27 AM
Hello Marco,
Thank you for the suggestion for such an API. Your points have been updated for that.
Until we add the API, you can use the method given below:
private int IndexFromPoint(RadListBox listBox, Point pos)
{
RadItem item = listBox.ElementTree.GetElementAtPoint(pos) as RadItem;
if (item != null)
return listBox.Items.IndexOf(item);
return -1;
}
For example, the code in the handler for MouseMove event of RadListBox will be: