I often embed a TForm descendant into another TForm descendant as follows:
var Form1: TForm1; Form2: TForm2; begin Form2.Parent := Form1; Form2.BorderStyle := bsNone; Form2.Align := alClient; Form2.Show; end;
This usually works fine, but sometimes the controls in Form2 do not align properly. Is there a general way to solve this problem?
Does anyone know what causes this "misalignment"?
I know that I could use TFrame for this kind of work, but I have a lot of library code that I would have to rewrite, and I see no reason why the TForm in TForm should not work?
Edit: I identified the TcxListView component as the culprit here, I sent an error report to the component provider (DevExpress):
http://www.devexpress.com/issue=B194161
Edit 2: DevExpress developers analyzed the problem and said that it was actually a defect in the Embarcadero TGridPanel component:
http://qc.embarcadero.com/wc/qcmain.aspx?d=90324
layout delphi vcl delphi-2007 tframe
Jens mühlenhoff
source share