This project is read-only.


Topics: User Forum
Dec 22, 2010 at 4:02 PM

Hi, I'm using calltips to display some tooltext that's loaded from a text document which is an embedded resource in my application. The font of the text document is the default one in Visual C# 2010 (I think it's Consolas), but when the tooltip is shown, the font changes and as a result of that the text gets misaligned. For example, if the document's text it something like this:

A     01
B     02
C     03

The tooltip gets shown as

A  01
B    02
C   03

How can I overcome this problem? Is there any property that defines the font for the calltips?

Dec 23, 2010 at 5:47 AM

I couldn't say for sure without looking at the text document in your embedded resource but I would bet that you have inconsistent whitespace characters. In VS, turn on whitespace display under Edit -> Advanced -> View Whitespace (I think). Ensure that the leading whitespace on all your lines is consistent. Using spaces instead of tabs will help.


Dec 24, 2010 at 9:10 AM

That's also what I thought, so I guess you're right. Anyway I managed to 'fix' the problem by using dots instead of spaces. It's aligned now and there's not much of a difference.