[Gambas-user] problems with TextLables
Charlie Reinl
na2492 at ...9...
Wed Dec 29 14:29:07 CET 2004
>On Wednesday 29 December 2004 14:11, Charlie Reinl wrote:
>> >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.
>>
>
>What do you mean ? It should return the width and height of the _displayed_
>text. Not the dimension of the internal caption !
No only the Text without the HTML-commandt
take "<B>TEXT</B>" (will be bold) then I need as output "TEXT".
Not in Bold or coloer or what ever.
>--
>Benoit Minisini
>mailto:gambas at ...1...
>
* Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de *
More information about the User
mailing list