I am trying to use docking as an alternative to embedding (related question) a TForm
into a TWinControl
(in this case a TTabSheet
).
The user shouldn't notice that there are two different forms at all.
How do I avoid the close button and "drag bar" at the top of the docked form?
A simplified version of my code:
var
TabSheet: TTabSheet;
Form: TSubForm;
begin
TabSheet := TTabSheet.Create(Self);
TabSheet.DockSite := True;
TabSheet.PageControl := MainPageControl;
Form := TSubForm.Create(TabSheet);
Form.ManualDock(TabSheet);
Form.Show;
end;
PS: I don't want to use a TFrame
which would of course be another alternative.
Update:
In this specific situation I am now considering to use TTabControl
instead of TPageControl
, so I can put all the controls into the master form.
I am using MVC/MVA anyway so the logic is separated from the UI.