Page 1 of 1

Controling the positioning of a substack when opened

Posted: Sat Mar 08, 2008 1:41 pm
by EzCoder
I've spent quite a while doing a search for this info, but it seems to be eluding me...

I have a "splash type" substack that I need to open in a certain position, based of the current location of the mainstack. (Possibly even based on the position of a certain control in the mainstack in fact.) I cannot seem to be able to find the coordinates of the main window or specific control once it's been moved by the user.

Any tips as to where I can find this info in the documentation?

Thanks,
EZ

Posted: Sat Mar 08, 2008 2:06 pm
by BvG

Code: Select all

put the location of stack xyz -- based on the screen
put the location of [button|field|whatever] xyz -- based on the stack/card
You already knew it without noticing :)

Also possibly of use:

Code: Select all

put the screenLoc -- center of screen
put the screenRect -- rectangle of the screen
put the rectangle of this card -- rectangle of window, based on stack eg. 0,0,519,466
put the rectangle of this stack -- same, but based on screen, eg. 168,212,687,678
And finally, sometimes one needs these instead of the location:
topleft property
bottomleft property
topright property
bottomright property

Said all that, maybe the "movestack" message is exactly what you want?

Posted: Sat Mar 08, 2008 2:28 pm
by EzCoder
Ah... that is just too easy!

Once again, I guess I was trying my best to make it harder than it really is with Rev. :roll:

Thank you SO MUCH for the helpful boost!

EZ