How can i change the font size of the IDE itself of Delphi XE6.
The IDE's dialogs are not using my Windows font preference, and i cannot find any option to change the font used by the IDE.
Alternatively, how do i get Delphi XE6 to honor the user's font preferences?
If you need to quickly change the font size while in the editor, press Ctrl+Alt+S to open the IDE settings, go to Editor | General, and select Change font size with Command+Mouse Wheel or Change font size with Control+Mouse depending on your operating system.
If you load some text in the richedit and click left mouse button + move the mouse wheel, the text will zoom in or out, without loosing the text size formatting.
To change label text sizes for already existing labels, follow these steps: Select all labels that you want to change. Select the (Change Text Attributes) tool. Opens the Change Text Attributes dialog. Here you can select different fonts as well as height and width for the selected labels.
Pyscripter Tools menu > Options > Editor Options. Display tab > click Font. Select "Source Code Pro" from list of fonts. Select Style and Size if desired.
You can't
The font is hardcoded. You cannot change it.
Here's what I've tried
1 - Change BDS.EXE with a HEX editor
If you open up BDS.EXE
in a HEX-editor, look for TextHeight
and change the values from $0D (13) to something bigger, then the altered bds.exe will look exactly the same.
2 - Use EnumChildWindows
to spam the Delphi IDE with WM_SETFONT
messages
You can send a WM_SETFONT
message to the running Delphi main window.
You have to find the window using the FindWindow
API call.
From: http://msdn.microsoft.com/en-us/library/windows/desktop/ms632642%28v=vs.85%29.aspx
wParam
A handle to the font (HFONT). If this parameter is NULL, the control uses the default system font to draw text.
lParam
The low-order word of lParam specifies whether the control should be redrawn immediately upon setting the font. If this parameter is TRUE, the control redraws itself.
Because you want Delphi to use the default font, the message is really simple.
The Delphi XE6 main window is called TAppBuilder
, so you'll have to get the handle to that Window using FindWindow
.
I tried this, but it did not work.
unit Unit4;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm4 = class(TForm)
FontDialog1: TFontDialog;
Button1: TButton;
procedure Button1Click(Sender: TObject);
end;
var
Form4: TForm4;
implementation
{$R *.dfm}
const
DelphiWindows: array [1 .. 1] of PWideChar = ('TAppBuilder');
function EnumChildProc(const hWindow: hWnd; const hFont: LParam): boolean; stdcall;
begin
SendMessage(hWindow, WM_SETFONT, hFont, 1);
Result:= True;
end;
procedure TForm4.Button1Click(Sender: TObject);
var
BDSWindow: HWND;
ChildWindow: HWnd;
Font: HFONT;
i: Integer;
begin
if FontDialog1.Execute then begin
BDSWindow:= FindWindow(DelphiWindows[1], nil);
Font:= FontDialog1.Font.Handle;
EnumChildWindows(BDSWindow, @EnumChildProc, Font);
ShowMessage('Done');
end;
end;
end.
I have not tried the default font, because the Delphi font and the default font are the same on my system. And I don't want to change the default font.
Doing this changed 2 dropdown_boxes on my Delphi. Not a very good showing.
I posted this as an answer in the hope that you can get to a solution from here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With