Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default To show the whole text in a tooltip text

Hi,

I have UserForm which contains a textBox which cannot always display all of
its content because the width of the textBox is limited by my program. I
would like to give the user the possibility to see all of its content by
showing a tooltip text like the one we have when for instance, the left
window of Windows Explorer isn't wide enough to show its whole content. When
the mouse passes over the truncated text, we can see it in that tooltip
text. Is there a way we can do the same in Excel ?

I dont want to always show that tooltip text: it would not be usefull when
the text is short enough to be visible in the textBox. I don't want either
the textBox to be multiline neither have a scrollbar; its height must be
fixed at 1 line.

Thanks.

Pierre




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default To show the whole text in a tooltip text

Private Sub TextBox1_Change()

If Len(TextBox1) 25 Then
TextBox1.ControlTipText = TextBox1
Else
TextBox1.ControlTipText = ""
End If

End Sub

RBS


"Pierre Archambault" wrote in message
.. .
Hi,

I have UserForm which contains a textBox which cannot always display all
of
its content because the width of the textBox is limited by my program. I
would like to give the user the possibility to see all of its content by
showing a tooltip text like the one we have when for instance, the left
window of Windows Explorer isn't wide enough to show its whole content.
When
the mouse passes over the truncated text, we can see it in that tooltip
text. Is there a way we can do the same in Excel ?

I dont want to always show that tooltip text: it would not be usefull
when
the text is short enough to be visible in the textBox. I don't want either
the textBox to be multiline neither have a scrollbar; its height must be
fixed at 1 line.

Thanks.

Pierre





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default To show the whole text in a tooltip text

Wow !

Who told you that the text that goes in the textBox was 25 characters long ?



"RB Smissaert" a écrit dans le message de
...
Private Sub TextBox1_Change()

If Len(TextBox1) 25 Then
TextBox1.ControlTipText = TextBox1
Else
TextBox1.ControlTipText = ""
End If

End Sub

RBS


"Pierre Archambault" wrote in message
.. .
Hi,

I have UserForm which contains a textBox which cannot always display all
of
its content because the width of the textBox is limited by my program. I
would like to give the user the possibility to see all of its content by
showing a tooltip text like the one we have when for instance, the left
window of Windows Explorer isn't wide enough to show its whole content.
When
the mouse passes over the truncated text, we can see it in that tooltip
text. Is there a way we can do the same in Excel ?

I dont want to always show that tooltip text: it would not be usefull
when
the text is short enough to be visible in the textBox. I don't want

either
the textBox to be multiline neither have a scrollbar; its height must be
fixed at 1 line.

Thanks.

Pierre







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default To show the whole text in a tooltip text

Was it?

RBS

"Pierre Archambault" wrote in message
.. .
Wow !

Who told you that the text that goes in the textBox was 25 characters long
?



"RB Smissaert" a écrit dans le message de
...
Private Sub TextBox1_Change()

If Len(TextBox1) 25 Then
TextBox1.ControlTipText = TextBox1
Else
TextBox1.ControlTipText = ""
End If

End Sub

RBS


"Pierre Archambault" wrote in message
.. .
Hi,

I have UserForm which contains a textBox which cannot always display
all
of
its content because the width of the textBox is limited by my program.
I
would like to give the user the possibility to see all of its content
by
showing a tooltip text like the one we have when for instance, the left
window of Windows Explorer isn't wide enough to show its whole content.
When
the mouse passes over the truncated text, we can see it in that tooltip
text. Is there a way we can do the same in Excel ?

I dont want to always show that tooltip text: it would not be usefull
when
the text is short enough to be visible in the textBox. I don't want

either
the textBox to be multiline neither have a scrollbar; its height must
be
fixed at 1 line.

Thanks.

Pierre








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default To show the whole text in a tooltip text

Hi,

No it wasn't

But wait, I found a way to solve the problem...

General section level of UserForm:
Public BoxWidth As Single

Private Sub UserForm_Initialize()
BoxWidth=150 'Initial width of the control

Public DisplayText()

txtBox1 = Trim(MyString)
txtBox1.ControlTipText = ""
txtBox1.AutoSize = True
If txtBox1.Width BoxWidth Then
txtBox1.ControlTipText = Trim(MyString)
End If
txtBox1.Width = BoxWidth
txtBox1.AutoSize = False

End Sub

Thanks anyway
Pierre



"RB Smissaert" a écrit dans le message de
...
Was it?

RBS

"Pierre Archambault" wrote in message
.. .
Wow !

Who told you that the text that goes in the textBox was 25 characters

long
?



"RB Smissaert" a écrit dans le message

de
...
Private Sub TextBox1_Change()

If Len(TextBox1) 25 Then
TextBox1.ControlTipText = TextBox1
Else
TextBox1.ControlTipText = ""
End If

End Sub

RBS


"Pierre Archambault" wrote in message
.. .
Hi,

I have UserForm which contains a textBox which cannot always display
all
of
its content because the width of the textBox is limited by my

program.
I
would like to give the user the possibility to see all of its content
by
showing a tooltip text like the one we have when for instance, the

left
window of Windows Explorer isn't wide enough to show its whole

content.
When
the mouse passes over the truncated text, we can see it in that

tooltip
text. Is there a way we can do the same in Excel ?

I dont want to always show that tooltip text: it would not be

usefull
when
the text is short enough to be visible in the textBox. I don't want

either
the textBox to be multiline neither have a scrollbar; its height must
be
fixed at 1 line.

Thanks.

Pierre










Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the "tooltip" text in an excel chart [email protected] Charts and Charting in Excel 2 April 4th 23 02:23 PM
Change the tooltip text for a datapoint Hayeso Charts and Charting in Excel 4 December 16th 05 01:33 PM
tooltip text Duraiswamy Lingappan Links and Linking in Excel 1 April 7th 05 07:51 AM
Tooltip text over a label John Robinson[_2_] Excel Programming 4 February 27th 05 07:33 PM
How to add Tooltip text to Treeview Duraiswamy Lingappan Excel Programming 0 August 6th 04 12:06 PM


All times are GMT +1. The time now is 07:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"