Mac Buttons
From Free Pascal wiki
Revision as of 09:42, 7 July 2012 by Cringer000 (talk | contribs) (Information about button sizing on a Mac Application.)
By default, the button placed onto a form by Lazarus is 75 width by 25 height, which is not the standard for Mac Applications.
In order for buttons to appear oval, make the button height 22 maximum.
This can be done by setting the button height directly or through code.
CODE FOR A SINGLE BUTTON:
procedure TForm1.FormCreate(Sender: TObject); begin Button1.Height := 22; end;
CODE FOR ALL BUTTONS:
procedure TForm1.FormCreate(Sender: TObject); var I: Integer; begin for I := 0 to Form1.ControlCount - 1 do begin if (Form1.Controls[I].ClassType = TButton) then Form1.Controls[I].Height := 22; end; end;