My program uses dynamically created frames, and sometimes I get a message that their controls are not aligned correctly.
I use my own container control, inherited from TPanel, but the same problem can be found when using GridPanel.
Here is the test source that reproduces the problem (with compiled exe).
Key code snippets:
in the main form:
procedure TForm1.FormCreate(Sender: TObject);
begin
f := TFrame2.Create(Self);
f.Parent := Self;
end;
in frame:
constructor TFrame2.Create(AOwner: TComponent);
begin
inherited;
Edit1.Clear;
end;
The frame and all its controls are aligned and must have the width of the main form, but Edit1they ComboBox1do not visually align until you manually resize the form (Submission WM_SIZEdoes not affect).
Edit1.Clear, . , , . ComboBox1.Items.Add('') ..
GridPanel Panel, .
test2 @quasoft, - , combobox , , .