Adding tooltip to all UI controls << Back



Do you want to add tooltip support to every single UI control on the screen? If so, you have come to right place. I will show you how to add tooltip support for "Group" control. The same technique can be used for other controls. Afterwards, you can start setting psToolTip for the "Group" control.

P.S. It is imperative to set pbUseFormWindowHandle to False unless the control itself supports Form_Window_Handle. See Form_Window_Handle for details.

P.P.S. Huge shoutout to DaveR for trying out the code and pointing out the previous code didn't work. (It was the missing Page_Object/Page_Delete methods).

Use Windows

Class cGroup is a Group
	Procedure Construct_Object
		Forward Send Construct_Object
		Send Define_ToolTip_Support_Mixin
		Set pbUseFormWindowHandle to False
	End_Procedure // Construct_Object
	Procedure Page_Object Integer iState
		Forward Send Page_Object iState
		If (iState) Send AddToolTip
	End_Procedure // Page_Object
	Procedure Page_Delete
		Send DeleteToolTip
		Forward Send Page_Delete
	End_Procedure // Page_Delete
	Import_Class_Protocol ToolTip_Support_Mixin
End_Class // cGroup

Free Web Hosting