Board index » delphi » Tsplitter problem

Tsplitter problem

Hello all i have pretty nice problem with Splitters.
the thing is, i cant put the two splitters together so they would separate
three windows(i.e. Listviews, panels...).
It should look kind of like MS Dependency Walker, it's jut that there are
four windows there.

I have to have it like this: One window on the left (like files in dependeny
walker) one on the right, and one at the bottom
of the main window.

if anyone's there that can put it together in a small code i would greatly
appreciate as they are making me crazy.

Thnaks, Joe

 

Re:Tsplitter problem


Quote
In article <HJNR7.831$r03.28...@news.siol.net>, "Joe" <j...@intelcom.si> writes:
>if anyone's there that can put it together in a small code i would greatly
>appreciate as they are making me crazy.

! Put a control (for example a TGroupBox, TStringGrid, TMemo) on a form and set
its Align to alLeft.

2 Place a TSplitter on the form and set its Align to alLeft.

3 In the remaining space on the form place a TPanel (Panel2) on the form and
set its Align to alClient. Set its BevelOuter to bvNone so it becomes
invisible.

4 On Panel2 place another control (for example a TGroupBox, TStringGrid, TMemo)
and set its Align to alTop. This will be at the top of the right-hand side of
the splitter.

5 On Panel2 place a TSplitter with its Align set to alTop.

6 Set a final control (TGroupBox, TStringGrid, TMemo) on panel2 with its Align
set to alClient to fill the remaining space.

7 Set the appropriate cursors for the TSplitters.

That's it.

The principle is that the control whose size is being controlled (the
controllee) is first placed on its parent with the appropriate Align. On that
same parent place the controlling splitter with its Align set to the same as
the control being sized.

Because the Align's of controllee and controller must be the same, and only one
pair of controllee/controller can be on the same parent, you have to have a
panel filling the remaining alClient area of the first parent, on which to
place another controllee/controller pair.

It's all in help when you know how <gg>

Alan Lloyd
alangll...@aol.com

Re:Tsplitter problem


Wow! That was great! . A one time lesson,
Thanks a lot

Quote
"AlanGLLoyd" <alangll...@aol.com> wrote in message

news:20011212160812.07038.00000450@mb-fs.aol.com...
Quote
> In article <HJNR7.831$r03.28...@news.siol.net>, "Joe" <j...@intelcom.si>
writes:

> >if anyone's there that can put it together in a small code i would
greatly
> >appreciate as they are making me crazy.

> ! Put a control (for example a TGroupBox, TStringGrid, TMemo) on a form
and set
> its Align to alLeft.

> 2 Place a TSplitter on the form and set its Align to alLeft.

> 3 In the remaining space on the form place a TPanel (Panel2) on the form
and
> set its Align to alClient. Set its BevelOuter to bvNone so it becomes
> invisible.

> 4 On Panel2 place another control (for example a TGroupBox, TStringGrid,
TMemo)
> and set its Align to alTop. This will be at the top of the right-hand side
of
> the splitter.

> 5 On Panel2 place a TSplitter with its Align set to alTop.

> 6 Set a final control (TGroupBox, TStringGrid, TMemo) on panel2 with its
Align
> set to alClient to fill the remaining space.

> 7 Set the appropriate cursors for the TSplitters.

> That's it.

> The principle is that the control whose size is being controlled (the
> controllee) is first placed on its parent with the appropriate Align. On
that
> same parent place the controlling splitter with its Align set to the same
as
> the control being sized.

> Because the Align's of controllee and controller must be the same, and
only one
> pair of controllee/controller can be on the same parent, you have to have
a
> panel filling the remaining alClient area of the first parent, on which to
> place another controllee/controller pair.

> It's all in help when you know how <gg>

> Alan Lloyd
> alangll...@aol.com

Re:Tsplitter problem


Im Artikel <HJNR7.831$r03.28...@news.siol.net>, "Joe" <j...@intelcom.si>
schreibt:

Quote
>I have to have it like this: One window on the left (like files in dependeny
>walker) one on the right, and one at the bottom
>of the main window.

First create the bottom control, with alignment alBottom. Then insert the first
splitter on top of it, also with alBottom.

Now you can add the second set of controls, with align alLeft.

The remaining space is filled with the last control and alClient.

DoDi

Other Threads