Help tips on list boxes!

Automatically translated from English

Help tips or hints are very useful, as they simplify the user interface and help users understand objects that sometimes aren’t self-evident. 4D supports help tips in most areas and inputs when hovering the pointer over them, but that was not the case with a list box object.

With 4D v16 R5 we have added the possibility to display a help tip on a list box cell thanks to the enrichment of two commands.

Database example

Define a tip on a list box

The OBJECT SET HELP TIP command has been expanded to support list boxes:

// Set a help tip on myListbox object
OBJECT SET HELP TIP(*;"myListbox";"This is the list box help tip!")

display a tip on a list box cell

To make things even better, help tips can be defined according to the position of the mouse. With a just few lines of code, you can set help tips based on the hovered column and even according to each row!

For this, the LISTBOX GET CELL POSITION command has also been enhanced with two new, optional parameters (mouseX and mouseY, in pixels) and returns the corresponding column and row numbers.

This command can be called during the On mouse move event to update the help tip content dynamically, according to the column and row position of the mouse over the list box.

GET MOUSE($x;$y;$button)
// Get the list box column and row to know what cell the user hovers
LISTBOX GET CELL POSITION(*;"myListbox";$x;$y;$column;$row)
If($column=1) & ($row=1)
  // Update tip content according to the hovered cell
  OBJECT SET HELP TIP(*;"myListbox";"This is cell (1;1)")
End if

Roland Lannuzel

• Product Owner & 4D Expert •

After studying electronics, Roland went into industrial IT as a developer and consultant, building solutions for customers with a variety of databases and technologies. In the late 80’s he fell in love with 4D and has used it in writing business applications that include accounting, billing and email systems.

Eventually joining the company in 1997, Roland’s valuable contributions include designing specifications, testing tools, demos as well as training and speaking to the 4D community at many conferences. He continues to actively shape the future of 4D by defining new features and database development tools.