OPEN FONT PICKER
OPEN FONT PICKER
Does not require any parameters |
---|
This command is not thread-safe, it cannot be used in preemptive code.
Description
The OPEN FONT PICKER command displays the system font picker dialog box.
Note: This is a modal dialog box under Windows but not under OS X.
When the user selects a font and/or a style and validates the dialog box, the changes are applied to the current text selection in the object with the focus, if the "Allow Font/Color Picker" property is checked for this object (see the Design Reference manual). Otherwise, the command does nothing.
If the font was changed, the On After Edit form event is generated for the object .
Example
In a form, you want to add a button to display the font picker in order to allow users to modify the font or style of a Text variable area. Make sure that:
- the Text variable has the "Allow font/color picker" property checked .
- the "Focusable" property for the button has been unchecked.
Here is the button code:
Case of
:(FORM Event=On Clicked)
GOTO OBJECT(textVar) //gives the variable the focus
OPEN FONT PICKER
End case