Doumis
2017-09-06T07:05:32Z
Hi,
I try to show a calculation help in a cell-ToolTip. Maybe someone can help me formatting the text.
I already tried using vbtab and i also tried using a calculated number of spaces - but the font is not suitable for that way.

This is how it looks right now:
How it is

This is the photoshopped way it should be:
How it should be

Is there a way to do this?

VB6 / ActiveX iGrid 4.7

Thank you in advance :)
Thomas
Igor/10Tec
2017-09-06T11:29:19Z
As I know, there is no way to format the native tooltip text according to your needs.
Doumis
2017-09-06T11:40:01Z
Thanks Igor! I just found out how to use the TextWidth-Function of a UserForm - i nearly fixed my issue with this function 🙂
KGunder
2017-11-09T11:50:31Z
Originally Posted by: Doumis 

Thanks Igor! I just found out how to use the TextWidth-Function of a UserForm - i nearly fixed my issue with this function 🙂



Hi Doumis,

could you please share us your solution??
Doumis
2017-11-09T12:23:00Z
Hi KGunder,
I reply in english - if you want to have a german version, please pm me ;)

There's a function in VB-Forms to calculate a texts' width: UserForm1.TextWidth(Text) as Single
So first I calculated the length of the longest row.
After that I added so many blank spaces to all further rows, to get (nearly) the same text width.
You just have to know, where you want to insert the needed blank spaces into the texts.

Example:
(sorry, but I had to switch this block to code, to show the additional spaces...)

Hello my Name is Doumis.      <-- TextWidth = 24  This is the longest row
Hello my Name is Anna.        <-- TextWidth = 22 - 2 more blank spaces needed!
Hello my Name is   Anna.      <-- 2 additional blank spaces inserted in before the word Anna.

The text of my ToolTip contains always the same text and only the values at the end of the lines differ. So this solution works for me. Maybe it helps you, too :)

regards... Doumis