04-24-2009 05:14 AM
Is there a way to position a tab control so that it is always in the centre of the screen (even if the user changes the window size)?
I have tried using the panel size properties to determine the centre and then use the tab control's position reference. But it seems to me that the control's position is relative to its starting position(??).
Is there a way to poisiton it relative to the panel's origin?
Thanks in advance.
ssk
Solved! Go to Solution.
04-24-2009 05:23 AM
If you don't mind it resizing, you can right-click the tab control and select "Scale Object with Pane".
If you need it to remain constant width and height, then you're on the right track with property nodes. You should be able to query the front panel size for each resize event, and with a little bit of mathematics use that information to determine new position coordinates for the tab such that its centre remains in the middle.
04-24-2009 06:16 AM
If I wire some constants to the position property for my tab control I would expect it to always be in the same position.
If I move the scrollbar so that the tab control is just off screen then when I run it does not pull it by to the previous positio. I think I need to tie it to the origina of the window. I have tried to do this using the Pane_Origin property as a reference but when I run it still seems to position the tab control elsewhere.
I thought this would be straightforward!!
04-24-2009 06:32 AM
04-24-2009 07:44 AM
I was making things too complicated as usual!
Thanks
10-13-2011 01:09 PM
Just what I needed thanks.