[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 315
  • Last Modified:

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?
0
David L. Hansen
Asked:
David L. Hansen
  • 2
1 Solution
 
chaauCommented:
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

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now