Question Problem using SetToolTip for dynamic control

WoloMan

New member
Joined
Jun 15, 2010
Messages
2
Programming Experience
5-10
In my VB.net 2005 app, I'm creating controls dynamically and setting the tooltip, but the tooltips don't show up at runtime.

Here is the code:
VB.NET:
            'Note: CNT is a counter variable
            txtarrDesc(CNT) = New TextBox
            With txtarrDesc(CNT)
                .Location = New System.Drawing.Point(X, Y)
                .Size = New System.Drawing.Size(400, 20)
                .ReadOnly = True
                .Name = "txtarrDesc" & CNT
                .Tag = CNT
                .Text = row("Description")
            End With
            Me.Panel1.Controls.Add(txtarrDesc(CNT))

            [B]ToolTip1.SetToolTip(txtarrDesc(CNT), "Double-click to see details")[/B]

The last line doesn't work. The code uses a tooltip already on the form, but I've also tried instantiating a tooltip and that still didn't work.

Any ideas?
 
Back
Top