devxlogo

Create “Tag Tips”

Create “Tag Tips”

Use the Tag property and the MouseMove event to create “tag tips”which look like tool tips. Create a label to be used as the tool tipbox and set its visible property to False, and its AutoSize property toTrue. Then add this code to the MouseMove event of the control to whichyou are adding tag tip text:

 Label1.Caption = Command1.TagLabel1.Top = Command1.Top + Command1.HeightLabel1.Left = Command1.Left + Command1.Width / 2Label1.Visible = TRUE

Set the Tag property of the control to the text you want to displayas the tag tip:

 Command1.TAG = "This is the TAG TIP"

Add this to the MouseMove event of the form. It turns off the tag tipwhen you move your mouse off the control:

 Label1.Visible = FALSE

devx-admin

Share the Post: