Solved

Exposing the tooltiptext property of UserControls

Posted on 1998-11-29
1
221 Views
Last Modified: 2010-07-27
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
Comment
Question by:mpgalvin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
ameba earned 100 total points
ID: 1447275
' 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question