Mac Buttons/ru
English · Русский
(macOS only)
По умолчанию кнопка, размещенная на форме в среде Lazarus имеет размер 75 (свойство Width) на 25 (свойство Height), который является нестандартным для приложений в системе macOS.
Для того, чтобы кнопки отображались овальными, установите высоту (свойство Height) в максимальное значение 22.
Это можно сделать, установив высоту кнопки напрямую (в режиме разработки) или программно.
КОД ДЛЯ ОДНОЙ КНОПКИ:
procedure TForm1.FormCreate(Sender: TObject);
begin
Button1.Height := 22;
end;КОД ДЛЯ ВСЕХ КНОПОК:
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.
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.
| When | Who | What changed |
|---|---|---|
| Useroflazarus | Created page | |
| Mathias | (minor) | |
| Useroflazarus | ||
| FTurtle | Deleted categories because they are placed in template | |
| Trev | Fixed syntax highlighting (minor) | |
| Trev | Fixed platform name (minor) |
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
