You never showed the code for Panel1...?  How big is Panel1?
Also it isn't a good idea to declare f1, f2 and E as local variables
in FormCreate.  You will never be able to reference it again....

Regards,
 - Graeme -



On 04/05/06, Alexander Todorov <[EMAIL PROTECTED]> wrote:
Hello,
what do you expect to be the result from the following code :

procedure TForm1.FormCreate(Sender: TObject);
var f1, f2 : TButton;
    E : TEdit;
begin
   f1 := TButton.Create(Panel1);
   with f1 do
     begin
       Parent := Panel1;
       Align := alRight;
       Caption := '1';
     end;

   f2 := TButton.Create(Panel1);
   with f2 do
     begin
       Parent := Panel1;
       Align := alRight;
       Caption := '2';
     end;

   E := TEdit.Create(Panel1);
   with E do
     begin
        Parent := Panel1;
        Align := alClient;
     end;
end;


I assumed that button f1 will be aligned to the right, button f2 will
be aligned to the right, next to the f1, and the edit box will fill
the remaining space.

See the attached image. This happens with Lazarus and Delphi.
Bug or a feature ????





--
There's no place like 127.0.0.1

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to