font TrvActionFontEx

Properties   Methods   Events

<< Click to display table of contents >>

font TrvActionFontEx

Properties   Methods   Events

TrvActionFontEx is the action for "Font" command. It uses an advanced font dialog.

Unit RichViewActions;

Syntax

TrvActionFontEx = class(TrvActionFonts)

hmtoggle_arrow1Hierarchy

Description

If UserInterface=False, the action applies its properties to the selected text. The list of properties to apply is specified in ValidProperties.

If UserInterface=True, the action uses a dialog window. The action performs the following steps:

1.assigns font attributes from the selected text to the action's properties

2.calls OnShowingDialog event

3.displays a dialog window

4.applies changes made in the dialog window to the action's properties

5.applies the action's properties to the selected text.

 

For example, if you want to apply {"Arial", 12, not bold, dotted underline} to the selected text in RichViewEdit1:

with rvActionFontEx1 do

begin

  UserInterface := False;

  ValidProperties := [rvfimFontName, rvfimSize, rvfimBold,

    rvfimUnderline, rvfimUnderlineType];

  Font.Name := FontName;

  FontSizeDouble := 12*2;

  Font.Style := [fsUnderline];

  UnderlineType := rvutDotted;

  ExecuteTarget(RichViewEdit1);

  UserInterface := True;

end;

See also:

TrvActionFonts