[Gambas-user] problems with TextLables

Charlie Reinl na2492 at ...9...
Wed Dec 29 13:11:00 CET 2004


>On Tuesday 28 December 2004 23:39, Charlie Reinl wrote:
>> Salut Benoit,
>>
>> I know it is 2 day before 1.0
>> But I have problems with the TextLables (RC5)
>>
>> While trying to analyze the TextLable.Text I found that.
>>
>> How to handle '<'  and '>' , see example.(push Buttons)
>>
>> I wished I would have something like TextLable.TransformedText, which shows

>> you the Text as it will displayed (without the format stuff)
>>
>> I need it for the attached ToolBox. To calculate the size off the
>> TextLable.
>>
>> Amicalment
>> Charlie
>
>If I understand well, you need a function to know the dimension of the 
>displayed HTML text. This is a problem in Qt :-)

No not a Function, only the possibillity to get the Text who will displayed
(without the HTML format stuff)

like :
 TextLabel.Text = "<B>TEXT</B>"
 then:
 Print TextLabel.DisplaydText 
 
 TEXT
>
>You can try to put your text in a TextView, and use the TextWidth and 
>TextHeight properties. I'm not sure that it works in every case, because 
>these values seems to be calculated by Qt the later possible, i.e. when the

>TextView had been displayed.

That works well, but you have all the <B> etc. and so the result will be too
big.

>
>Regards,
>
>-- 
>Benoit Minisini
>mailto:gambas at ...1...

And have a look to the TextLabel project , the 2 examples show you a bug.

Amicalment
Charlie 
* Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de *




More information about the User mailing list