Tech Tip: How to procedurally change the font style on objects, fields and variables
PRODUCT: 4D | VERSION: | PLATFORM: Mac & Win
Published On: November 15, 2002
Compatibility: version 6.8.x
You may find a need to alter a font style depending on a condition. The way to do this is by using the command FONT STYLE. In the example below, we are changing the font style to plain or bold based on a condition.
`Changes the font style for a field, variable and an object
If (condition=True)
FONT STYLE ([Table1]Field1; Bold)`Field
FONT STYLE ($MyVariable; Bold)`Variable
FONT STYLE(*;"MyButton"; Bold)`Object
Else
FONT STYLE ([Table1]Field1; Plain)`Field
FONT STYLE ($MyVariable; Plain)`Variable
FONT STYLE(*;"MyButton"; Plain)`Object
End If