Font size

General TRichView support forum. Please post your questions here
Post Reply
bswift
Posts: 37
Joined: Thu Sep 15, 2005 8:26 pm

Font size

Post by bswift »

Is there a way to increase font size without using actions?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

See Demos\Delphi\Editors\Editor 2\ demo. It shows how to implement editing operations without RichViewActions.
Keys: ApplyStyleConversion method and OnStyleConversion event.

How to modify this demo to add a command increasing font size by 1 point:
1) Add a new constant
TEXT_SIZEPLUS1 = 9;
2) Add a button calling rve.ApplyStyleConversion(TEXT_SIZEPLUS1);
3) In TForm1.rveStyleConversion, in the case statement, add

Code: Select all

 TEXT_SIZEPLUS1:
          FontInfo.Size := FontInfo.Size+1;
bswift
Posts: 37
Joined: Thu Sep 15, 2005 8:26 pm

Post by bswift »

Thanks Sergey,

All makes sense now.

Bruce
Post Reply