Page 1 of 1
Font size
Posted: Wed Apr 12, 2006 4:43 am
by bswift
Is there a way to increase font size without using actions?
Posted: Wed Apr 12, 2006 9:07 am
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;
Posted: Wed Apr 12, 2006 1:13 pm
by bswift
Thanks Sergey,
All makes sense now.
Bruce