By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,877 Members | 1,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,877 IT Pros & Developers. It's quick & easy.

'Tab' character causing problem in tooltips

P: n/a
I'm trying to display formatted multi-line text in tooltips. It seems that
the newline character works fine whereas the 'tab' character is causing
problems and can't display properly.

More specifically, when I set the caption of a tooltip to something like
"Hello" + vbTab + "there", the tooltip display as "Hello" and the rest of the
string is truncated.

I've searched the web but haven't seen any solution to this. I've seen
people suggest using '\t' in C# to show tab spaces, and I guess it works in
that language (though I haven't tried it). But I'm working on a VB.NET
project now and hope I can do the same in this language.

Is there anything I can do to make the 'tab' shown in tooltips or it's
simply not supported in current version of VB.NET (2003)?

Btw, I've tried it with message boxes and the 'tab' works fine there.

Please help. Thanks.
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi Cesario,

Try using chr(9) instead.

Bernie Yaeger

"Cesario" <Ce*****@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
I'm trying to display formatted multi-line text in tooltips. It seems that
the newline character works fine whereas the 'tab' character is causing
problems and can't display properly.

More specifically, when I set the caption of a tooltip to something like
"Hello" + vbTab + "there", the tooltip display as "Hello" and the rest of
the
string is truncated.

I've searched the web but haven't seen any solution to this. I've seen
people suggest using '\t' in C# to show tab spaces, and I guess it works
in
that language (though I haven't tried it). But I'm working on a VB.NET
project now and hope I can do the same in this language.

Is there anything I can do to make the 'tab' shown in tooltips or it's
simply not supported in current version of VB.NET (2003)?

Btw, I've tried it with message boxes and the 'tab' works fine there.

Please help. Thanks.

Nov 21 '05 #2

P: n/a
"Cesario" <Ce*****@discussions.microsoft.com> schrieb:
I'm trying to display formatted multi-line text in tooltips. It seems that
the newline character works fine whereas the 'tab' character is causing
problems and can't display properly.

More specifically, when I set the caption of a tooltip to something like
"Hello" + vbTab + "there", the tooltip display as "Hello" and the rest of
the
string is truncated.


Tabs are not supported as part of a tooltip. This limitation is independent
from the .NET programming language you are using.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

P: n/a
Thanks Bernie, I've actually tried vbTab, Chr(9), and ControlChars.Tab. I
guess they map to the same thing...

"Bernie Yaeger" wrote:
Hi Cesario,

Try using chr(9) instead.

Bernie Yaeger

"Cesario" <Ce*****@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
I'm trying to display formatted multi-line text in tooltips. It seems that
the newline character works fine whereas the 'tab' character is causing
problems and can't display properly.

More specifically, when I set the caption of a tooltip to something like
"Hello" + vbTab + "there", the tooltip display as "Hello" and the rest of
the
string is truncated.

I've searched the web but haven't seen any solution to this. I've seen
people suggest using '\t' in C# to show tab spaces, and I guess it works
in
that language (though I haven't tried it). But I'm working on a VB.NET
project now and hope I can do the same in this language.

Is there anything I can do to make the 'tab' shown in tooltips or it's
simply not supported in current version of VB.NET (2003)?

Btw, I've tried it with message boxes and the 'tab' works fine there.

Please help. Thanks.


Nov 21 '05 #4

P: n/a
Thanks Herfried. I've seen people talking about creating custom tooltips
using Windows API. And I saw the balloon tooltip implementation on
codeproject though I didn't look into its details. From the screenshots, it
still seems possible to format text in tooltips?

And what about those nice tooltips that pop up on some websites that contain
more than just text? They display pictures and animations as well. I don't
know how different they're from tooltips in desktop applications. Maybe the
way they're implemented only makes sense in web browsers? But browsers are
themselves running on desktops...Could you please shed some light on this?

"Herfried K. Wagner [MVP]" wrote:
"Cesario" <Ce*****@discussions.microsoft.com> schrieb:
I'm trying to display formatted multi-line text in tooltips. It seems that
the newline character works fine whereas the 'tab' character is causing
problems and can't display properly.

More specifically, when I set the caption of a tooltip to something like
"Hello" + vbTab + "there", the tooltip display as "Hello" and the rest of
the
string is truncated.


Tabs are not supported as part of a tooltip. This limitation is independent
from the .NET programming language you are using.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.