Topic: Set window location

Hello all -

Is there a way to set a child window to open in a specific location within a parent window?

2 (edited by sibprogsistem 2020-03-28 18:25:48)

Re: Set window location

tjohnson0473 wrote:

Hello all -

Is there a way to set a child window to open in a specific location within a parent window?

Form2.Parent:=Form1;
Form2.Parent:=Form1.Panel1;

or
http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=6429&download=0

Post's attachments

Attachment icon Безымяннrrый.png 12.89 kb, 120 downloads since 2020-03-28 

Re: Set window location

Sorry I am still new to all of this. But I would like the window state to default to open at the bottom of the parent window or the ability to set the location just like you would a panel.

Re: Set window location

Hi Tjohnson, Sibprogsistem,
Another way is to specify the location of child forms relative to the 'top' and 'left' of the parent form.
Have a look at the attachment and click on the '+' buttons on Form1 (the parent) to see each child form positioned in the appropriate 'zone' (stock in or stock out).
There is a lot of other stuff in the script that's irrelevant to your question (I didn't have time to strip it out) but have a look at lines 94-95 and lines 103-104 for how it's done.
And remember to set the 'position' object property of the child forms to 'po designed' (it's the bit I always forget!).
Derek.

Post's attachments

Attachment icon warehouse.zip 391.4 kb, 288 downloads since 2020-03-28 

Re: Set window location

Thank you Derek. That is what I needed.