Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

Exposing the tooltiptext property of UserControls

Anybody know how to expose the (TTT) property of a usercontrol?  No matter whether the control is a simple command button, or an amalgamation of several
controls, I can *never* get the (TTT) to work properly.  It appears in the property list, and retains its value, but it only appears when I hover over part of the UC not covered by a constitutent control -- what do I need to do ?
0
mpgalvin
Asked:
mpgalvin
1 Solution
 
amebaCommented:
' you must also set ToolTipText prop of your controls you placed on your usercontrol
Public Property Let tt(ByVal New_Val As String)
    Label1.ToolTipText = New_Val
    Text1.ToolTipText = New_Val
    PropertyChanged "tt"
End Property

Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
    Call PropBag.WriteProperty("tt", Label1.ToolTipText, "")
..
End Sub

Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
    Dim tmp As String
    tmp = PropBag.ReadProperty("tt", "")
    Label1.ToolTipText = tmp
    Text1.ToolTipText = tmp
..
End Sub
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now