Finely control your tips in 4D

Automatically translated from English

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:

Example Database

Fabrice Mainguené

• Product Owner •

Fabrice Mainguené joined 4D Program team in November, 2016. As a Product Owner, he is in charge of writing the user stories then translating it to functional specifications. His role is also to make sure that the feature implementation delivered is meeting the customer need.

After obtaining a Bachelor degree in Computer Science at CNAM, Fabrice joined a small software publishing company as a Windev developer. Then he worked for different companies in industry and trade areas as a Windev and web developer as well as technical advisor on new features.