[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Dialogs' (#lcl)

TFontDialog

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Dialog used to select a font typeface and size.

Declaration

Source position: dialogs.pp line 378

type TFontDialog = class(TCommonDialog)

protected

  class procedure WSRegisterClass; override;

  

Registers this component class with the current WidgetSet.

  function DefaultTitle; override;

  

DefaultTitle returns the default title for a dialog.

public

  procedure ApplyClicked; virtual;

  

Performs actions needed when a font is selected using the dialog.

  constructor Create(); override;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

published

  property Title: TTranslateString;

  

The Title or Caption displayed for the dialog.

  property Font: TFont; [rw]

  

Contains the Font selected in the dialog.

  property MinFontSize: Integer; [rw]

  

Minimum font size allowed in the font selection dialog.

  property MaxFontSize: Integer; [rw]

  

Maximum font size allowed in the font selection dialog.

  property Options: TFontDialogOptions; [rw]

  

A set of TFontDialogOption options enabled for the dialog.

  property OnApplyClicked: TNotifyEvent; [rw]

  

Event handler signalled when the Apply button is clicked in the font dialogs.

  property PreviewText: string; [rw]

  

A text snippet displayed as a preview for the selected font in the dialog.

end;

Inheritance

TFontDialog

  

Dialog used to select a font typeface and size.

|

TCommonDialog

  

The base type from which other dialogs are derived.

|

TLCLComponent

  

The base class for LCL components which have an associated widget.

|

TComponent

?

TObject

Description

TFontDialog is a TCommonDialog descendant which implements a font selection dialog.

TFontDialog displays selection lists for font name, size, style, and color. It can be configured to limit the available typefaces, sizes, and visual presentations using the Options, MinFontSize and MaxFontSize properties.

When the dialog is executed, the selected font is made available in the Font property. The OnApplyClicked event handler can be used to perform actions needed when the optional Apply button is clicked in the dialog.

See also

TCommonDialog

  

The base type from which other dialogs are derived.

TFontDialogOption

  

An enumerated list of constants to set the options of a Font dialog.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.