Math for determining mouse position to frame in sections?
Sometimes my sucky math catches up with me. I needs to do the following:
Populate a list object with a variable number of lines.
Determine X or Y of mouse in relation to the frame based on the number of lines in the list.
Select a line from the list based on that mouse position, regardless of the number of lines the list may contain.
Example:
If the mouse is at the very top of the screen, the first line of the list is selected.
If the mouse is at the very bottom of the screen, the last line of the list is selected.
If the mouse is in the middle of the screen, the middle line of the list is selected.
Etc.
Etc.
I just need a formula for doing that...I'm sure it's not as tricky as it's currently seeming to be.