Solved

Make the font larger in the object inspector and palette

Posted on 2004-08-02
4
1,059 Views
Last Modified: 2013-12-03
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
Comment
Question by:seabear
  • 2
  • 2
4 Comments
 

Author Comment

by:seabear
Comment Utility
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
 
LVL 14

Accepted Solution

by:
DragonSlayer earned 250 total points
Comment Utility
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
 

Author Comment

by:seabear
Comment Utility
Hi Dragonslayer,
    Thank you very much, I am most impressed by GExperts. - Dan
0
 
LVL 14

Expert Comment

by:DragonSlayer
Comment Utility
Glad you found it useful :-)
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now