BUG: TAnchors
Hi,
if I put a Panel on a Form and a Button on the right site of this Panel and set Button.Anchors := akRight, then the Button is not visible at the runtime. If the Button is set directly on the form it works! What can I do? Here is the Code I use:
var
MyForm: TForm;
MyButton: TButton;
MyPanel: TPanel;
begin
MYform := TForm.Create(nil);
MyPanel := TPanel.Create(nil);
MyPanel.Parent := MyForm;
MyPanel.Align := alClient;
MyButton := TButton.Create(nil);
MyButton.Parent := MYPanel;
MyButton.Top := 10;
MyButton.Left := 200;
MYButton.Anchors := akRight;
MyForm.ShowModal;
MYButton.Free;
MYPanel.Free;
MyForm.Free;
end.
if I put a Panel on a Form and a Button on the right site of this Panel and set Button.Anchors := akRight, then the Button is not visible at the runtime. If the Button is set directly on the form it works! What can I do? Here is the Code I use:
var
MyForm: TForm;
MyButton: TButton;
MyPanel: TPanel;
begin
MYform := TForm.Create(nil);
MyPanel := TPanel.Create(nil);
MyPanel.Parent := MyForm;
MyPanel.Align := alClient;
MyButton := TButton.Create(nil);
MyButton.Parent := MYPanel;
MyButton.Top := 10;
MyButton.Left := 200;
MYButton.Anchors := akRight;
MyForm.ShowModal;
MYButton.Free;
MYPanel.Free;
MyForm.Free;
end.
Comments
[eng]
I have the same problem and I for shit do not know as to solve him. I try this to make in C ++.
If you know solution write: cyfrowy_baron@op.pl.
[~Eng]
I have solution, but in C ++, you on Delphi have me alone to translate. This will be somehow similarly.
TAnchors A;
A.Clear();
A = A << akRight << akBottom << akTop << akLeft;
Memo1->Anchors = A;
Look to my service with times, it is Polish, but source codes are in English language.
Cyfrowy Baron