4D v16 R4 is providing you with more flexibility regarding tips management. Beyond the possibility to enable or disable all tips at once using database parameters, you can now finely control how your tips will be displayed: the delay before showing it and for how long it is shown. And you no longer need to use 4D Pack, everything is included in 4D now!
Enable or disable tips
In the past, you could enable or disable all tips in your application using the dedicated 4D Pack commands: o_AP Get tips state and _o_AP SET TIPS STATE. From 4D v16 R4, it is now possible to do the same directly in 4D, using the SET DATABASE PARAMETER and Get database parameter commands.
// Disable the tips in the application
SET DATABASE PARAMETER(Tips enabled;0)
// Enable the tips in the application
SET DATABASE PARAMETER(Tips enabled;1)
// Get the status of tips displaying in the application
EnableTips:=Get database parameter(Tips enabled)
But this single setting does not allow a fine control of tips display, this is why 4D is going further and provides new options.
New options to finely control tips display
There are 2 new options to control how tips are displayed in your application:
- Control the delay before displaying tips:
// Set the delay (ticks = 1/60 s) before the display of the tip
SET DATABASE PARAMETER(Tips delay;10)
// Get the delay (ticks = 1/60 s) before the display of the tip
TipsDelay:=Get database parameter(Tips delay)
- Control the duration of tips display:
// Set the duration (ticks = 1/60 s) of the display of the tip
SET DATABASE PARAMETER(Tips duration;50)
// Get the duration (ticks = 1/60 s) of the display of the tip
TipsDuration:=Get database parameter(Tips duration)
Dynamically update a tip text
The OBJECT SET HELP TIP command has been updated to permit you to dynamically update the text of a tip when it is being displayed. It permits you for example to change the tip content while hovering different regions
For more details, we invite you to have a look at the following example database where you will find more code examples: