-
Notifications
You must be signed in to change notification settings - Fork 3
7. Specific cases
If you want to display a tooltip on an element (cell, header, row, footer, etc.) of a lisbox, you will use targeting by the use of coordinates instead of the target object's name.
Concerning the recovery of the coordinates, we advise you to retrieve the Mouse X and Mouse Y values on the click on the listbox to then determine the pointed cell. Once the calculation is done, you can define the coordinates of the cell to generate the tooltip. An example is provided with the AJUI_Tip_Lab test application.
We will consider here the case where your form contains several pages and you want to display tooltips on different pages.
In practice, nothing has changed compared to the usual prerequisites. It will simply be necessary to take the caution to duplicate the subform object "AJUI_Tip_sf" on each of the pages and to add the suffix "_page" + page number. (Example: AJUI_Tip_Tip_sf_page2 for page 2). This rule does not apply to page 1 which keeps the initial name "AJUI_Tip_sf".
Important point in this regard, be careful to always generate your tooltips in the right page context. For example, if you generate your tooltip on the form loading method and then follow up with a page change, there will be a problem because the component will have created it in the first page but not in the open page.
In this chapter we discuss the use of tooltips associated with a target object included in a subform. This case is quite simple to handle.
NB: It is important to understand that the subform object "AJUI_Tip_sf" must be at the level of the main form in order to be fully visible and in the foreground.
Once defined, the component will be responsible to rise the tooltip information to the first level so that it appears in its context.
It is possible to associate the 4D Form object in the context of the Tip subform. To do this, you MUST define Form.tip_sf_details:=new object ( )
in the main form in which the Tip will be displayed. You can then add all the properties you need to this object. Once this is done, it is possible to communicate via this attribute between the main form and the subform loaded in the Tip.
AJUI Tip 1.6.2 - Wednesday, 29 July 2020
User Manual 🇺🇸
-
Introduction
-
Theory
-
Practice
-
Lab
Manuel d'utilisation 🇫🇷