Solved

Make the font larger in the object inspector and palette

Posted on 2004-08-02
4
1,081 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
ID: 11698600
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
ID: 11701054
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
ID: 11701426
Hi Dragonslayer,
    Thank you very much, I am most impressed by GExperts. - Dan
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 11701781
Glad you found it useful :-)
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi selector screen 2 80
TEMBEDDEDWB how can i change its user agent ? 8 58
enhance the following code 3 32
Can I print examples of all of my installed fonts? 6 21
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…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

810 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