Changing text appearance
A great way to improve the user experience is to change the way text appears on the screen. This recipe will explore several options that are available to you.
Getting ready
Design the Customer List form and save it as a new object.
How to do it...
Design the copy of the Customer List form.
Create a function named
GetColor
that returns an integer.Add the following code to the function:
IF "Location Code" = 'BLUE' THEN EXIT(16711680) ELSE IF "Location Code" = 'GREEN' THEN EXIT(65280) ELSE IF "Location Code" = 'RED' THEN EXIT(255) ELSE IF "Location Code" = 'YELLOW' THEN EXIT(65535)
Create a function named
GetBold
that returns a boolean value.Add the following code to the function:
EXIT("Credit Limit (LCY)" > 1000);
In the
OnFormat
trigger for the name column, add the following code:CurrForm.Name.UPDATEFORECOLOR(GetColor); CurrForm.Name.UPDATEFONTBOLD(GetBold);
Save and close the form.
How it works...
The trigger that controls the appearance of text is the OnFormat
trigger...