[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1179
  • Last Modified:

Make the font larger in the object inspector and palette

I cannot easily see the font used in the Delphi IDE. How can I change the font used in the object inspector and on the component palette? I do not want Marco Cantu's plug in and I need code or a plug-in package that works for Delphi 7

Thanks in advance - Dan
0
seabear
Asked:
seabear
  • 2
  • 2
1 Solution
 
seabearAuthor Commented:
I have tried finding the child windows of the object inspector and posting a message to each child window asking for a font size increase but there is no change of font.

The code I used for this is given below. It finds the child windows OK but does not change any font sizes. - Dan

function TopWindows(aHandle: HWnd; theForm: TForm1): Boolean; Export; StdCall;
//this is a callback function, i
var
    Buffer : array[0..255] of Char;
    aClassname, aCaption : string;
begin
    Result :=  True;   //Stop when there are no more Windows
    GetClassName(aHandle, Buffer, 255);
    aClassname :=StrPas(Buffer);
    GetWindowText(aHandle, Buffer, 255);
    aCaption := StrPas(Buffer);
    theForm.listbox1.items.add(aClassname + '     ' + aCaption);
    if aClassName = 'TPropertyInspector' then      // file finder class name
    begin
        theForm.ObInspecthandle := aHandle;
        theForm.lblOIhandle.caption := inttostr(aHandle);
        Result :=  false;             //exit callback loop
    end;
end;

function ChildWindows(aHandle: HWnd; theForm: TForm1): Boolean; Export; StdCall;
//this is a callback function,
var
    Buffer : array[0..255] of Char;
    aClassname, aCaption : string;
begin
    Result :=  True;   //Stop when there are no more Windows
    GetClassName(aHandle, Buffer, 255);
    aClassname :=StrPas(Buffer);
    GetWindowText(aHandle, Buffer, 255);
    aCaption := StrPas(Buffer);
    theForm.memo2.lines.add(aClassname + '     ' + aCaption);
    try
      //ask for a font size change - I think
        postmessage(aHandle,WM_SETFONT ,theForm.lblObjectInspectoront.font.handle ,1);
    except
    end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
    EnumWindows(@TopWindows, LongInt(Self));
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
    EnumChildWindows(ObInspecthandle, @ChildWindows, LongInt(Self));
end;

end.
0
 
DragonSlayerCommented:
Download gexperts www.gexperts.org, install the plugin into your Delphi, and you can configure it via the Delphi's main menu: GExperts -> Configuration -> IDE -> Custom Fonts.

BTW, GExperts has tonnes of other functions such as AutoCorrect, AutoCapitalize, etc... enjoy!



DragonSlayer.
0
 
seabearAuthor Commented:
Hi Dragonslayer,
    Thank you very much, I am most impressed by GExperts. - Dan
0
 
DragonSlayerCommented:
Glad you found it useful :-)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now