Tech Tip: Opening the Font picker through a button
PRODUCT: 4D | VERSION: 15 | PLATFORM: Mac & Win
Published On: September 23, 2015
The Font picker is a simple UI that allows users to choose the font they want for a selected text variable.
The 4D command OPEN FONT PICKER opens the font picker.
OPEN FONT PICKER takes in no parameters, and will only open the font picker if the focus is on a text variable. This means that the cursor must be over an enterable text variable, else the command does nothing. To use the command in a button, the following steps can be taken
- In the text variable, check the property "Allow Font/Font Picker" in the properties list.
- Uncheck the focusable property of the button.
- Set the focus to the text variable using GOTO OBJECT.
- Open the font picker using OPEN FONT PICKER.
Case of :(Form event=On Clicked) GOTO OBJECT(textVar) OPEN FONT PICKER End case |