Skip to content

Instantly share code, notes, and snippets.

@jacobthurman
Created December 26, 2013 21:46
Embed
What would you like to do?
Quick Delphi plugin to change font size in the Object Inspector. Not perfect, has quirks. Use at your own risk.
unit OIFontTweakMain;
interface
uses Vcl.Forms, Vcl.Controls, Vcl.Dialogs, Vcl.StdCtrls;
procedure Register;
implementation
function GetOIForm: TForm;
var
I: Integer;
begin
Result := nil;
for I := 0 to Screen.FormCount - 1 do
begin
if Screen.Forms[I].Name = 'PropertyInspector' then
begin
Result := Screen.Forms[I];
Exit;
end;
end;
end;
function GetChildControl(AParent: TWinControl; AName: string): TWinControl;
var
I: Integer;
begin
Result := nil;
for I := 0 to AParent.ControlCount - 1 do
begin
if AParent.Controls[I].Name = AName then
begin
Result := TWinControl(AParent.Controls[I]);
Exit;
end;
end;
end;
function GetOIControl: TCustomListBox;
var
OIForm: TForm;
begin
OIForm := GetOIForm;
Result := TCustomListBox(GetChildControl(GetChildControl(OIForm,
'Panel3'), 'PropList'));
end;
procedure Register;
var
I, J: Integer;
OI: TListBox;
begin
OI := TListBox(GetOIControl);
OI.Font.Size := 14;
OI.ItemHeight := 24;
end;
end.
@NenadSteric
Copy link

very nice - thank you !
Do you know by chance also the names for the tool palette and the project manager ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment