TFontDialog class
Dialog used to select a font typeface and size.
Declaration
TFontDialog = class(TCommonDialog)Inheritance
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
Title | published | The Title or Caption displayed for the dialog. |
Font | published | Contains the Font selected in the dialog. |
MinFontSize | published | Minimum font size allowed in the font selection dialog. |
MaxFontSize | published | Maximum font size allowed in the font selection dialog. |
Options | published | A set of TFontDialogOption options enabled for the dialog. |
PreviewText | published | A text snippet displayed as a preview for the selected font in the dialog. |
Methods
WSRegisterClass | protected | Registers this component class with the current WidgetSet. |
DefaultTitle | protected | DefaultTitle returns the default title for a dialog. |
ApplyClicked | public | Performs actions needed when a font is selected using the dialog. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
Events
OnApplyClicked | published | Event 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.
