Log In    |    Knowledge Base    |    4D Home
Tech Tip: Handling objects help tips with one method
Published On: June 23, 2006
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

This tech tip shows how to dynamically update a help tip of an object with only one method and one help tip. This is very useful if there is a large number of 4D objects on the form.

First, create a help tip in the 4D tool box named ObjectHelpTip and give it a value of "<HelpTipText>". This will show the value of HelpTipText variable as the object help tip.

Second, select all objects that should show a help tip and assign the ObjectHelpTip help tip to the objects you selected. Insert the following method in every selected object to update help tip value dynamically:

Case of

     : (Form event=On Mouse Enter )

         ShowHelpTip (Self)
End case

Finally, create the method named ShowHelpTip that will dynamically assign the help tips. This method will require "tool_Getpointer" method found in tech tip 29679. Arrays HelpTipObjectName and HelpTipValue hold object name and help tip that should be displayed, respectively.

` Method: ShowHelpTip





     ` Get the name of the object

     $variableName:=(tool_Getpointer ($selectedObject))

          ` Find the object in the HelpTipObjectName array

     $arrayPos:=Find in array(HelpTipObjectName;$variableName)

          ` If object if found, assign help tip value to HelpTipValue variable

     If ($arrayPos#-1)



End if