__alex
asked on
More splitter woes
Hi,
my form looks like this:
-------------------------- ----
Panel1 Splitter1 Panel2
alClient alRight alRight
-------------------------- ----
If I change the parent property of the form (Nil -> TabSheet) my controls get messed up. If the size of the TabSheet is different than the size of my form I expect my controls to resize but they don't. Actually I use Form1.Width := Form1.Width - 1 to get it done but that's goofy. Any hint apprechiated.
Thanks in advance.
my form looks like this:
--------------------------
Panel1 Splitter1 Panel2
alClient alRight alRight
--------------------------
If I change the parent property of the form (Nil -> TabSheet) my controls get messed up. If the size of the TabSheet is different than the size of my form I expect my controls to resize but they don't. Actually I use Form1.Width := Form1.Width - 1 to get it done but that's goofy. Any hint apprechiated.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I guess that's what I do :-(
I will come back to you on Monday. Have a nice weekend!
I will come back to you on Monday. Have a nice weekend!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Back in the office again...
I guess I have to apologize again: I forgot to mention I already do align the form:
procedure TForm2.SpeedButton1Click(S ender: TObject);
begin
Parent := Form1.TabSheet1;
Splitter1.Left := Panel2.Left - Splitter1.Width - 2;
Form2.Align := alClient;
end;
procedure TForm2.SpeedButton2Click(S ender: TObject);
begin
Parent := nil;
Splitter1.Left := Panel2.Left - Splitter1.Width - 2;
Form2.Align := alNone;
end;
If Panel2.Width is greater than the width of the tabsheet and I make the panel appear in the tabsheet the splitter is sort of "under" Panel2. Furthermore this does not happen with D7 but with D5. I guess I stay with my "Form1.Width := Form1.Width - 1" workaround and close this question. Thanks for your effort!
Alex
I guess I have to apologize again: I forgot to mention I already do align the form:
procedure TForm2.SpeedButton1Click(S
begin
Parent := Form1.TabSheet1;
Splitter1.Left := Panel2.Left - Splitter1.Width - 2;
Form2.Align := alClient;
end;
procedure TForm2.SpeedButton2Click(S
begin
Parent := nil;
Splitter1.Left := Panel2.Left - Splitter1.Width - 2;
Form2.Align := alNone;
end;
If Panel2.Width is greater than the width of the tabsheet and I make the panel appear in the tabsheet the splitter is sort of "under" Panel2. Furthermore this does not happen with D7 but with D5. I guess I stay with my "Form1.Width := Form1.Width - 1" workaround and close this question. Thanks for your effort!
Alex
ASKER
I set the Splitter1.Visible property in the OnFormHide and OnFormShow event <--- https://www.experts-exchange.com/questions/21092429/Splitter-woes.html