HI,
I have a set of dynamically created buttons and textbox's. Each button
is linked to a textbox using the accessiblename property. I want to
show a button tool tip containing the text box's text. My code so far
is below although i know this wont work!
any help is greatly appreciated.
Private Sub AddNewDriverToo lStripMenuItem_ Click(ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
AddNewDriverToo lStripMenuItem. Click
Dim NewBtn As New Button()
NewBtn.Accessib leName = CStr(Now)
Me.Controls.Add (NewBtn)
Dim NewTxt As New RichTextBox
NewTxt.Accessib leName = NewBtn.Accessib leName
Me.Controls.Add (NewTxt)
Dim ctlControl As Control
Dim s As String
For Each ctlControl In Me.Controls
If TypeOf ctlControl Is RichTextBox And
ctlControl.Acce ssibleName = NewBtn.Accessib leName Then
s = NewBtn.Text
End If
Next
ToolTip1.SetToo lTip(NewBtn, s)
I have a set of dynamically created buttons and textbox's. Each button
is linked to a textbox using the accessiblename property. I want to
show a button tool tip containing the text box's text. My code so far
is below although i know this wont work!
any help is greatly appreciated.
Private Sub AddNewDriverToo lStripMenuItem_ Click(ByVal sender As
System.Object, ByVal e As System.EventArg s) Handles
AddNewDriverToo lStripMenuItem. Click
Dim NewBtn As New Button()
NewBtn.Accessib leName = CStr(Now)
Me.Controls.Add (NewBtn)
Dim NewTxt As New RichTextBox
NewTxt.Accessib leName = NewBtn.Accessib leName
Me.Controls.Add (NewTxt)
Dim ctlControl As Control
Dim s As String
For Each ctlControl In Me.Controls
If TypeOf ctlControl Is RichTextBox And
ctlControl.Acce ssibleName = NewBtn.Accessib leName Then
s = NewBtn.Text
End If
Next
ToolTip1.SetToo lTip(NewBtn, s)
Comment