tags:

views:

23

answers:

1

I'm trying to get the .Left property of a specific tab page in a tab control (based on the header), the .Left and .Right properties seem to return the position of the tab control itself, not the specific page. I want to align a label with the tab page header, the problem is that the page can move depending on whether other tab pages are present or not.

Is this possible?

+2  A: 

EDIT: It is possible - Use GetTabRect(x) which returns a rectangle representing the tab's rectangle.

Matt Breckon
I'm sure there are plenty of ways...In this case we are positioning a label above the tab so that we can use an ErrorProvider to indicate which tabs have controls with errors, otherwise users have to click through each tab to find the errors. Usability enhanced.
Simon
It is possible - see the edited post but personally I think a tab control in which you could have lots of errors on different tabs sounds horrific. Are you really sure this is the right way to solve this?
Matt Breckon