-
Hi Guys/Gals
I've been looking for an answer for this :( Please help ?
How can we find the Y Coordinate of the selected/Highlighted item in a ListBox ??
I want this Y value while using the Up/Down Key.
I know i could use MouseDown Event But it works only while using the mouse. However,
i tried invoking it in the list.Click Event with no success.
Also, utilizeing GetCursorPos API wouldn't return the mouse Pos. in the listBox !!
Thanx.
-
This is how you get the Y coordinate. Place this in the KEYUP event of the listbox.
Code:
Me.Caption = List1.ListIndex * Me.TextHeight("Xyz") + List1.TopIndex
-
-
Nitro, that won't work if you have different fonts in the listbox and form:
Me.Font = List1.Font