473,471 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need some code help with tool tip display text

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 AddNewDriverToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AddNewDriverToolStripMenuItem.Click
Dim NewBtn As New Button()
NewBtn.AccessibleName = CStr(Now)
Me.Controls.Add(NewBtn)
Dim NewTxt As New RichTextBox
NewTxt.AccessibleName = NewBtn.AccessibleName
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.AccessibleName = NewBtn.AccessibleName Then
s = NewBtn.Text
End If
Next
ToolTip1.SetToolTip(NewBtn, s)

Mar 2 '07 #1
4 1419
Is there some reason you posted this 3 times?

Just wondering,
Robin S.
----------------------------------
"Marc" <ma*********@hotmail.comwrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
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 AddNewDriverToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AddNewDriverToolStripMenuItem.Click
Dim NewBtn As New Button()
NewBtn.AccessibleName = CStr(Now)
Me.Controls.Add(NewBtn)
Dim NewTxt As New RichTextBox
NewTxt.AccessibleName = NewBtn.AccessibleName
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.AccessibleName = NewBtn.AccessibleName Then
s = NewBtn.Text
End If
Next
ToolTip1.SetToolTip(NewBtn, s)

Mar 2 '07 #2
On 2 Mar, 16:25, "RobinS" <Rob...@NoSpam.yah.nonewrote:
Is there some reason you posted this 3 times?

Just wondering,
Robin S.
----------------------------------"Marc" <marc_cro...@hotmail.comwrote in message

news:11**********************@p10g2000cwp.googlegr oups.com...
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 AddNewDriverToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AddNewDriverToolStripMenuItem.Click
Dim NewBtn As New Button()
NewBtn.AccessibleName = CStr(Now)
Me.Controls.Add(NewBtn)
Dim NewTxt As New RichTextBox
NewTxt.AccessibleName = NewBtn.AccessibleName
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.AccessibleName = NewBtn.AccessibleName Then
s = NewBtn.Text
End If
Next
ToolTip1.SetToolTip(NewBtn, s)- Hide quoted text -

- Show quoted text -
Cause 3 times is ucky

Mar 2 '07 #3
Cause 3 times is ucky

Not if you make us mad - we don't like multipostings.

BTW I answered this in other thread.

Thanks,

Seth Rowe
On Mar 2, 12:11 pm, "Marc" <marc_cro...@hotmail.comwrote:
On 2 Mar, 16:25, "RobinS" <Rob...@NoSpam.yah.nonewrote:
Is there some reason you posted this 3 times?
Just wondering,
Robin S.
----------------------------------"Marc" <marc_cro...@hotmail.comwrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
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 AddNewDriverToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AddNewDriverToolStripMenuItem.Click
Dim NewBtn As New Button()
NewBtn.AccessibleName = CStr(Now)
Me.Controls.Add(NewBtn)
Dim NewTxt As New RichTextBox
NewTxt.AccessibleName = NewBtn.AccessibleName
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.AccessibleName = NewBtn.AccessibleName Then
s = NewBtn.Text
End If
Next
ToolTip1.SetToolTip(NewBtn, s)- Hide quoted text -
- Show quoted text -

Cause 3 times is ucky

Mar 2 '07 #4
Ucky is right! :-P

Robin
-----------------------------
"Marc" <ma*********@hotmail.comwrote in message
news:11**********************@z35g2000cwz.googlegr oups.com...
On 2 Mar, 16:25, "RobinS" <Rob...@NoSpam.yah.nonewrote:
>Is there some reason you posted this 3 times?

Just wondering,
Robin S.
----------------------------------"Marc" <marc_cro...@hotmail.comwrote
in message

news:11**********************@p10g2000cwp.googleg roups.com...
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 AddNewDriverToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AddNewDriverToolStripMenuItem.Click
Dim NewBtn As New Button()
NewBtn.AccessibleName = CStr(Now)
Me.Controls.Add(NewBtn)
Dim NewTxt As New RichTextBox
NewTxt.AccessibleName = NewBtn.AccessibleName
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.AccessibleName = NewBtn.AccessibleName Then
s = NewBtn.Text
End If
Next
ToolTip1.SetToolTip(NewBtn, s)- Hide quoted text -

- Show quoted text -

Cause 3 times is ucky

Mar 3 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tom | last post by:
I have a report where one field tends to be rather lengthly and ends up being several lines long while another field has several short entries. The problem I have is that the first of the short...
18
by: Q. John Chen | last post by:
I have Vidation Controls First One: Simple exluce certain special characters: say no a or b or c in the string: * Second One: I required date be entered in "MM/DD/YYYY" format: //+4 How...
2
by: Keith Kowalski | last post by:
I anm opening up a text file reading the lines of the file that refer to a tif image in that file, If the tif image does not exist I need it to send an email stating that the file doesn't exist...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
2
by: george.leithead | last post by:
Hi all, I have a very strange problem! In following Web page (which is generated from a CMS System), the navigation to the left 'dissapears' when you roll the mouse over the links? It does not...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
21
by: nihad.nasim | last post by:
Hi there, I have a database in Access that I need on the web. The web page should connect to the database and write records for certain tables and view records for others. I want to know a...
3
by: 100grand | last post by:
Modify the Inventory Program to use a GUI. The GUI should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.