Solved

Splitter woes

Posted on 2004-08-12
3
204 Views
Last Modified: 2010-04-05
Hi,

my form looks like this:
------------------------------
Panel1   Splitter1   Panel2
alClient  alRight     alRight
------------------------------
If I change the parent property of the form (Nil -> TabSheet, TabSheet -> Nil) my controls might get messed up: the splitter appears on the very right of the form. This is obviously nonsense since there's nothing left to split. It does not always happen but depends on the size of the controls. Anyone?

TIA
0
Comment
Question by:__alex
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
esoftbg earned 300 total points
ID: 11790855
procedure TForm2.SpeedButton1Click(Sender: TObject);
begin
  Parent := Form1.TabSheet1;
  Splitter1.Left := Panel2.Left - Splitter1.Width - 2;
end;

procedure TForm2.SpeedButton2Click(Sender: TObject);
begin
  Parent := nil;
  Splitter1.Left := Panel2.Left - Splitter1.Width - 2;
end;

emil
0
 
LVL 2

Author Comment

by:__alex
ID: 11791900
Thank you!
BTW Splitter1.Left := 0 is sufficient.
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 11792115
You are welcome !
Wow !
Splitter1.Left := 0;
is the best !
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FMX StringGrid1->Canvas->FillRect Problem 3 153
Working with hours 3 58
tidtcpserver connection lost handle 2 88
Delphi problems to abort a printjob 9 21
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question