Solved

Splitter woes

Posted on 2004-08-12
3
203 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

16 Experts available now in Live!

Get 1:1 Help Now