Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing the "tooltip" text in an excel chart | Charts and Charting in Excel | |||
Change the tooltip text for a datapoint | Charts and Charting in Excel | |||
tooltip text | Links and Linking in Excel | |||
Tooltip text over a label | Excel Programming | |||
How to add Tooltip text to Treeview | Excel Programming |