|
| child windows and forms |
 |
Sat, 1 Sep 2007 14:12:25 +0800 |
When I create a parent window with a similarly sized form, then create a
smaller child window containing a form and place it in the middle of the
parent window, all the controls in the child window/form are visible but
none of them are able to get focus or respond to mouse clicks.
I guess the parent window/form somehow overlays the child window/form
allowing the child win/form to be visible but not accessible.
This is different from ususal window behaviour where the top window is both
visible and active. The work around is to reduce the size of the form in the
parent window so it doesn't intrude under/over the child window or create
more child windows and cover the innerdimensions of the parent window with
these and contained forms instead of one.
Is this to be expected or will there be some sort of z-order for forms?
John
|
| Post Reply
|
| Re: child windows and forms |
 |
Sun, 2 Sep 2007 13:56:10 +0800 |
"John Roberts" <remjohnr@iinet.net.au> wrote in message
news:fbavtj$ff9$1@ipx22096.ipxserver.de...
> When I create a parent window with a similarly sized form, then create a
> smaller child window containing a form and place it in the middle of the
> parent window, all the controls in the child window/form are visible but
> none of them are able to get focus or respond to mouse clicks.
> I guess the parent window/form somehow overlays the child window/form
> allowing the child win/form to be visible but not accessible.
> This is different from ususal window behaviour where the top window is
> both visible and active. The work around is to reduce the size of the form
> in the parent window so it doesn't intrude under/over the child window or
> create more child windows and cover the innerdimensions of the parent
> window with these and contained forms instead of one.
> Is this to be expected or will there be some sort of z-order for forms?
> John
I just had another thought that reducing the size of the main win form so it
doesn't overlap the child window would disallow any upward size scaling
given form dimensions cannot be changed once created.
John
|
| Post Reply
|
| Re: child windows and forms |
 |
Mon, 03 Sep 2007 14:36:44 +010 |
John Roberts wrote:
> Make that upward or downward scaling as either will cause problems.
> The other odd thing is that when I reduce the size with the mouse of the
> main win and the scrollbars appear, the contained form in the main window
> will scroll but the child window remains in the same place.
The only reasonable way to scale a form would be to create a new one and
populate it. This is in fact what the form designer does if you resize
the form. It actually creates a new one and moves everything across.
As for the child window, if its parent is the window that contains the
form, then the form is not the parent of the window, so it won't move
with the form, it will move with the container window.
|
| Post Reply
|
| Re: child windows and forms |
 |
Mon, 3 Sep 2007 16:28:18 +0800 |
"John Roberts" <remjohnr@iinet.net.au> wrote in message
news:fbdj9u$btg$1@ipx22096.ipxserver.de...
>
> "John Roberts" <remjohnr@iinet.net.au> wrote in message
> news:fbavtj$ff9$1@ipx22096.ipxserver.de...
>> When I create a parent window with a similarly sized form, then create
a
>> smaller child window containing a form and place it in the middle of
the
>> parent window, all the controls in the child window/form are visible
but
>> none of them are able to get focus or respond to mouse clicks.
>> I guess the parent window/form somehow overlays the child window/form
>> allowing the child win/form to be visible but not accessible.
>> This is different from ususal window behaviour where the top window is
>> both visible and active. The work around is to reduce the size of the
>> form in the parent window so it doesn't intrude under/over the child
>> window or create more child windows and cover the innerdimensions of
the
>> parent window with these and contained forms instead of one.
>> Is this to be expected or will there be some sort of z-order for
forms?
>> John
> I just had another thought that reducing the size of the main win form so
> it doesn't overlap the child window would disallow any upward size scaling
> given form dimensions cannot be changed once created.
> John
>
Make that upward or downward scaling as either will cause problems.
The other odd thing is that when I reduce the size with the mouse of the
main win and the scrollbars appear, the contained form in the main window
will scroll but the child window remains in the same place.
John
|
| Post Reply
|
| Re: child windows and forms |
 |
Tue, 4 Sep 2007 16:56:06 +0800 |
"Neil Robinson" <neil@simpol.com> wrote in message
news:fbh2le$hpu$2@ipx22096.ipxserver.de...
> John Roberts wrote:
>> Make that upward or downward scaling as either will cause problems.
>> The other odd thing is that when I reduce the size with the mouse of
the
>> main win and the scrollbars appear, the contained form in the main
window
>> will scroll but the child window remains in the same place.
>
> The only reasonable way to scale a form would be to create a new one and
> populate it. This is in fact what the form designer does if you resize
> the form. It actually creates a new one and moves everything across.
>
> As for the child window, if its parent is the window that contains the
> form, then the form is not the parent of the window, so it won't move
> with the form, it will move with the container window.
>
> Ciao, Neil
I experimented with this and the parent window scollbars appear only when
the contained form is obscured. If the parent window form is made narrower
and the child window is obscured but not the form then the scrollbars do not
appear so that explains that. Fairly standard behaviour now that I look at
other apps with frame windows. Probably best not to have scrollbars on the
parent window and resize the child windows in the parent's onsize event if
necessary. Leave the scroll bars to the child windows except for unusual
circumstances.
Thanks, John
|
| Post Reply
|
|
|
|
|
|
|
|
|
|