Need location of a ListBox's SelectedItem so I can place another control right next to it.

I have a button on a form which needs to be moved right next to the selected item in a ListBox each time the user selects an item in that ListBox.  How can I get the y value of the selected item?
LVL 15
David L. HansenProgrammer AnalystAsked:
Who is Participating?
 
chaauConnect With a Mentor Commented:
Use GetItemRectangle method. The method will return a Rectangle. Use Y property of the Rectangle for the y coordinate.
0
 
David L. HansenProgrammer AnalystAuthor Commented:
It was right under my nose :)
0
 
David L. HansenProgrammer AnalystAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.