Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

alTop, alBottom, alLeft, alRight ?????

0 views
Skip to first unread message

Song Weng Sam

unread,
May 24, 1996, 3:00:00 AM5/24/96
to

Note: Please use fixed pitch font to look at this message
=========================================================

Lets say I want to put 2 panels on a form. The following is the
property of the 2 panels (namely PanelA and PanelB) :

PanelA.Align := alBottom;
PanelB.Align := alLeft;

The effect is as follows :

|--------|----------------------------------|
| | |
| | |
| PanelB | |
| | |
| | |
---------|-----------------------------------
| |
| PanelA |
| |
|-------------------------------------------|


But I want the following :

|--------|----------------------------------|
| | |
| | |
| PanelB | |
| | |
| | |
| |----------------------------------|
| | |
| | PanelA |
| | |
|--------|----------------------------------|

Question is : "How do I achieve this?" For your info, the alTop and
alBottom has got priority of overriding alLeft and alRight. Please
advise soon. BTW, do email me a copy of your reply when you post your
solutions...

Thank you in advance.

Finest Regards,
Sam

/***************************************************
/*
/* From the desk of Song Weng Sam
/*
/* Email : son...@pacific.net.sg
/* Pager : 9-492-4014
/*
/***************************************************

Eric Kendrick

unread,
May 24, 1996, 3:00:00 AM5/24/96
to

Song Weng Sam (son...@pacific.net.sg) wrote:
: Note: Please use fixed pitch font to look at this message
: =========================================================

[ Placing two panels on a form, one with align property of alLeft, and
one with align property of alBottom. The Second panel will always take
the whole of the bottom of the area, and the first panel will be
placed above it. This is not always the required result, ie:
+-+ +-+
| | Got This | |Wanted this
+-+---+ | +---+
| | | | |
+-----+ +-+---+
]

I always use a third panel, as follows:

Create Panel1
Set Align to alLeft
Create Panel2
Set Align to AlClient
Set BevelOuter to BvNone
Create Panel3 on Panel2
Set Align to AlBottom

This will appear and behave exactly as you wanted, unless you want access to
the form canvas in the upper right corner, in which case you will have to
align the panels manually using the form OnResize event:

...
Panel1.Height := ClientHeight;
Panel2.Top := ClientHeight - Panel2.Height;
Panel2.Width := ClientWidth - Panel1.Width;
...

Just leave the align property at alNone and position the panels correctly on
the form for the initial display, and whenever the form is resized, they
will be resized to follow. This is most useful for resizing edit boxes when
the form has been resized (I most notice this behaviour in Netscape, for the
URL edit box)

TTFN
Eric Kendrick


--
Eric Kendrick // er...@oasis.icl.co.uk

Daryl L. Knowles

unread,
May 25, 1996, 3:00:00 AM5/25/96
to

Song Weng Sam wrote:
>
> Note: Please use fixed pitch font to look at this message
> =========================================================
>

Sounds like you need to use "Send to Back" to move Panel A to the back
of Panel B.

Song Weng Sam

unread,
May 27, 1996, 3:00:00 AM5/27/96
to

On 24 May 1996 09:37:39 GMT, e...@oasis.icl.co.uk (Eric Kendrick)
wrote:

I cannot do this because I wanted to display the whole of Panel2. If
I made Panel3 as a child of Panel2, it will cause part of Panel2 to be
hidden. This is not desirable. Further to that, as the program
border is sizeable, the panels are resized dynamically.

Any other suggestions???


>[ Placing two panels on a form, one with align property of alLeft, and
> one with align property of alBottom. The Second panel will always take
> the whole of the bottom of the area, and the first panel will be
> placed above it. This is not always the required result, ie:

[snip]

> Create Panel1
> Set Align to alLeft
> Create Panel2
> Set Align to AlClient
> Set BevelOuter to BvNone
> Create Panel3 on Panel2
> Set Align to AlBottom

\||||||||/
| ~ ~ |
(| @ @ |)
*****oOOo***(__)***oOOo********

From the desk of Song Weng Sam

Email : son...@pacific.net.sg
Pager : 9-492-4014

*****oOOo**********oOOo********

Peter van Lonkhuyzen

unread,
May 27, 1996, 3:00:00 AM5/27/96
to Song Weng Sam

Song Weng Sam wrote:
>
> Note: Please use fixed pitch font to look at this message
> =========================================================
>
> Lets say I want to put 2 panels on a form. The following is the
> property of the 2 panels (namely PanelA and PanelB) :
>
> PanelA.Align := alBottom;
> PanelB.Align := alLeft;
>
> The effect is as follows :
>
> |--------|----------------------------------|
> | | |
> | | |
> | PanelB | |
> | | |
> | | |
> ---------|-----------------------------------
> | |
> | PanelA |
> | |
> |-------------------------------------------|
>
> But I want the following :
>
> |--------|----------------------------------|
> | | |
> | | |
> | PanelB | |
> | | |
> | | |
> | |----------------------------------|
> | | |
> | | PanelA |
> | | |
> |--------|----------------------------------|
>
> Question is : "How do I achieve this?" For your info, the alTop and
> alBottom has got priority of overriding alLeft and alRight. Please
> advise soon. BTW, do email me a copy of your reply when you post your
> solutions...
>

Get A 3rd Panel Aligned to alClient and make PANEL C a child of that.

Regards
Peter

Wim Van Goethem

unread,
May 27, 1996, 3:00:00 AM5/27/96
to

On Fri, 24 May 1996 15:46:31 GMT, son...@pacific.net.sg (Song Weng
Sam) wrote:


>The effect is as follows :
>
>|--------|----------------------------------|
>| | |
>| | |
>| PanelB | |
>| | |
>| | |
>---------|-----------------------------------
>| |
>| PanelA |
>| |
>|-------------------------------------------|
>
>
>But I want the following :
>
>|--------|----------------------------------|
>| | |
>| | |
>| PanelB | |
>| | |
>| | |
>| |----------------------------------|
>| | |
>| | PanelA |
>| | |
>|--------|----------------------------------|
>
>Question is : "How do I achieve this?" For your info, the alTop and
>alBottom has got priority of overriding alLeft and alRight. Please
>advise soon. BTW, do email me a copy of your reply when you post your
>solutions...

I had this problem also a few days ago. The only solution I found was
to use a third panel.

Place this third panel besides panel B with align alClient
You can then place panel A in the third panel with an alignment of
alBottom.

Wim Van Goethem

0 new messages