Sign in Join
Wiki copytemporary

Mac Buttons/ru

English · Русский

(macOS only)

По умолчанию кнопка, размещенная на форме в среде Lazarus имеет размер 75 (свойство Width) на 25 (свойство Height), который является нестандартным для приложений в системе macOS.

Для того, чтобы кнопки отображались овальными, установите высоту (свойство Height) в максимальное значение 22.

Это можно сделать, установив высоту кнопки напрямую (в режиме разработки) или программно.

КОД ДЛЯ ОДНОЙ КНОПКИ:

pascal
    procedure TForm1.FormCreate(Sender: TObject);
    begin
      Button1.Height := 22;
    end;

КОД ДЛЯ ВСЕХ КНОПОК:

pascal
    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;

From the Free Pascal wiki, page "Mac Buttons/ru", as it stood on 2019-12-18 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Edited on wiki.freepascal.org by 4 people, 2018–2019

From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.

WhenWhoWhat changed
UseroflazarusCreated page
Mathias (minor)
Useroflazarus
FTurtleDeleted categories because they are placed in template
TrevFixed syntax highlighting (minor)
TrevFixed platform name (minor)

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.