Solved

Splitter woes

Posted on 2004-08-12
3
202 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
Comment Utility
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
Comment Utility
Thank you!
BTW Splitter1.Left := 0 is sufficient.
0
 
LVL 12

Expert Comment

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

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Get height of a forms top border. 3 32
Delphi cmd execution 6 40
Correct Component for Shopping Cart. 2 85
Base1 Encode/Decode 3 21
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now