Kosmo零
Kosmo零

Reputation: 4151

Which way I can get ListBox item coords?

I want get Top, Left, Right and Bottom of item inside ListBox to show TextBox over it for item edit purpose.

For example: I need to know the Top-Left corner coords and Bottom-Right ones.

I read msdn and there are ListBox.IndexFromPoint method, but I need the opposite one, which is not exist.

Upvotes: 0

Views: 246

Answers (1)

dkozl
dkozl

Reputation: 33384

There is ListBox.GetItemRectangle which you could use:

var rect = myListBox.GetItemRectangle(1);

Upvotes: 1

Related Questions