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

TSplitter problems

0 views
Skip to first unread message

Claire

unread,
Jan 2, 2001, 9:31:38 AM1/2/01
to
Ive two panels separated by a vertical splitter on a form.
Left panel and splitter are both aligned alLeft, the other panel is aligned
alClient
The user is allowed to hide or display each of the panels - the remaining
panel stretches or shrinks according to number on screen.
Im having problems with the TSplitter aligning itself to the left of the
lefthand panel, instead of between the panels, at run-time after one or more
of the panels are made invisible/visible.
How do you ensure that the splitter component aligns correctly at run-time?
Its probs something to do with Z order, but Ive tried dynamic
creation/destruction of the splitter and it doesnt seem to make any
difference

--
Claire Humphrey
Software Engineer

Craig Stuntz

unread,
Jan 2, 2001, 10:47:58 AM1/2/01
to

Claire wrote:
>
> Ive two panels separated by a vertical splitter on a form.
> Left panel and splitter are both aligned alLeft, the other panel is aligned
> alClient
> The user is allowed to hide or display each of the panels - the remaining
> panel stretches or shrinks according to number on screen.
> Im having problems with the TSplitter aligning itself to the left of the
> lefthand panel, instead of between the panels, at run-time after one or more
> of the panels are made invisible/visible.
> How do you ensure that the splitter component aligns correctly at run-time?

I've run into this. It's annoying, but the fix is pretty simple:

Override the form's AlignControls method, call inherited, then set the
Left property of your left panel to 0.

HTH,

-Craig

--
Craig Stuntz Vertex Systems Corporation
Senior Developer http://www.vertexsoftware.com

Delphi/InterBase weblog: http://delphi.weblogs.com

Claire

unread,
Jan 2, 2001, 11:30:09 AM1/2/01
to
Many thanks Craig.
Looked through the help file after sending post, it seemed to suggest one
should force the Left property of the splitter before setting alignment. It
seems to be working so far.
0 new messages