Sign in Join
FPDoc Onlineexperiment

TFontDialog class

In unit Dialogs

Dialog used to select a font typeface and size.

Declaration

pascal
TFontDialog = class(TCommonDialog)

Inheritance

  1. TFontDialog
  2. TCommonDialog
  3. TLCLComponent
  4. TComponent
  5. TPersistent
  6. 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.

At run-time, TFontDialog is mapped to the native font selection dialog used for a given platform. Use Options to enable or disable features or behaviors in the dialog. Enabling an option does not mean that it is automatically available. Some options may not be supported in the native dialog for a given platform.

When the dialog is executed, the selected font and its attributes 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. Please note that the Apply button is available on the GTK2, GTK3, and Windows platforms. It is not currently implemented for QT platforms.

See also

Properties

TitlepublishedThe Title or Caption displayed for the dialog.
FontpublishedContains the Font selected in the dialog.
MinFontSizepublishedMinimum font size allowed in the font selection dialog.
MaxFontSizepublishedMaximum font size allowed in the font selection dialog.
OptionspublishedA set of TFontDialogOption options enabled for the dialog.
PreviewTextpublishedA text snippet displayed as a preview for the selected font in the dialog.

Methods

WSRegisterClassprotectedRegisters this component class with the current WidgetSet.
DefaultTitleprotectedDefaultTitle returns the default title for a dialog.
ApplyClickedpublicPerforms actions needed when a font is selected using the dialog.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.

Events

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

Inherited

From TCommonDialog (22)

AttachTo Close DoCanClose DoClose DoExecute DoShow Execute GetHeight GetWidth Handle HandleAllocated Height HelpContext OnCanClose OnClose OnDialogResult OnShow ResetShowCloseFlags SetHeight SetWidth UserChoice Width

From TLCLComponent (7)

DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance RemoveAllHandlersOfObject WidgetSetClass

From TComponent (74)

_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (5)

Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (36)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.