Discussion:
Possible bug?
(too old to reply)
Peter Landgren
2009-09-15 17:12:56 UTC
Permalink
Hi,

I try to put the character "<" in the Text of a TextLabel, but only space is shown in the form?
Same effect if I do it from code and not using the IDE.
The characters after "<" are not displayed in the form.

Using Gambas 2.16.

/Peter
Benoît Minisini
2009-09-15 17:29:42 UTC
Permalink
Post by Peter Landgren
Hi,
I try to put the character "<" in the Text of a TextLabel, but only space
is shown in the form? Same effect if I do it from code and not using the
IDE.
The characters after "<" are not displayed in the form.
Using Gambas 2.16.
/Peter
TextLabel wants HTML: so you must use &lt;

Regards,
--
Benoît Minisini
Peter Landgren
2009-09-15 18:59:25 UTC
Permalink
Post by Benoît Minisini
Post by Peter Landgren
Hi,
I try to put the character "<" in the Text of a TextLabel, but only space
is shown in the form? Same effect if I do it from code and not using the
IDE.
The characters after "<" are not displayed in the form.
Using Gambas 2.16.
/Peter
TextLabel wants HTML: so you must use &lt;
Regards,
Thanks,

Found it in the documentation too.

However a simple ">" works OK.
And the ";" seems not to be necessary, it's enough with "&lt".

/Peter
Ron_1st
2009-09-16 11:22:48 UTC
Permalink
Post by Peter Landgren
Post by Benoît Minisini
Post by Peter Landgren
Using Gambas 2.16.
/Peter
TextLabel wants HTML: so you must use &lt;
Then it should be named HtmLabel ???
IMHO text is text and a<b should show a<b
Post by Peter Landgren
Post by Benoît Minisini
Regards,
Thanks,
Found it in the documentation too.
However a simple ">" works OK.
And the ";" seems not to be necessary, it's enough with "&lt".
Bad habbit to do. This way we have got already to many bad
websites due IE wich do/did accept this in the past. Not a w3c std.

Try this in your label: " I say '&lt' is not equal to '&lt;' "
Read it now strict as text and look then in your label.

BTW.
When the TextLabel goes follow the strict HTML rules or
XML rules your app is broken.
A TextLabel should show IMHO the example exact as typed here.
Post by Peter Landgren
/Peter
Best regards,

Ron_1st

--
Benoît Minisini
2009-09-16 12:11:15 UTC
Permalink
Post by Ron_1st
Post by Benoît Minisini
Post by Peter Landgren
Using Gambas 2.16.
/Peter
TextLabel wants HTML: so you must use &lt;
Then it should be named HtmLabel ???
IMHO text is text and a<b should show a<b
This is not actually HTML, but some sort of subset. Let's call it "Rich text".

This syntax is native in gb.qt, and emulated in gb.gtk (it is converted on the
fly into Pango markup language).

See the /doc/richtext page in the wiki.
--
Benoît Minisini
Fabien Bodard
2009-09-16 13:28:39 UTC
Permalink
"Rich text is mainly used by TextLabel, GridView cells, and the
Draw.RichText method. "

and TextView ?


Le 16 septembre 2009 14:11, Benoît Minisini
Post by Benoît Minisini
Post by Ron_1st
Post by Benoît Minisini
Post by Peter Landgren
Using Gambas 2.16.
/Peter
TextLabel wants HTML: so you must use &lt;
Then it should be named HtmLabel ???
IMHO text is text and a<b should show a<b
This is not actually HTML, but some sort of subset. Let's call it "Rich text".
This syntax is native in gb.qt, and emulated in gb.gtk (it is converted on the
fly into Pango markup language).
See the /doc/richtext page in the wiki.
--
Benoît Minisini
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Fabien Bodard
2009-09-16 13:29:40 UTC
Permalink
2009/9/16 Fabien Bodard <***@gmail.com>:
"Rich text is mainly used by TextLabel, GridView cells, and the
Draw.RichText method. "
and TextView ? ------> I meen TextEdit (sorry i've 5 year late)
Post by Fabien Bodard
Le 16 septembre 2009 14:11, Benoît Minisini
Post by Benoît Minisini
Post by Ron_1st
Post by Benoît Minisini
Post by Peter Landgren
Using Gambas 2.16.
/Peter
TextLabel wants HTML: so you must use &lt;
Then it should be named HtmLabel ???
IMHO text is text and a<b should show a<b
This is not actually HTML, but some sort of subset. Let's call it "Rich text".
This syntax is native in gb.qt, and emulated in gb.gtk (it is converted on the
fly into Pango markup language).
See the /doc/richtext page in the wiki.
--
Benoît Minisini
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Gambas-user mailing list
https://lists.sourceforge.net/lists/listinfo/gambas-user
Pino Zollo
2009-09-16 16:01:22 UTC
Permalink
 "Rich text is mainly used by TextLabel, GridView cells, and the
Draw.RichText method. "
 and TextView ?      ------>  I meen TextEdit   (sorry i've 5 year late)
...but do not use the method Insert:

taSpots.Insert(p) ....it prints all chars including tags

use:

taSpots.Text = p

Only in this way Rich Text tags will be executed.

[ p is a string containing rich text and taSpot is the name of the TextEdit in
my project]

Regads
Pino
--
Key ID: 0xF6768208
Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208
Key server: hkp://wwwkeys.eu.pgp.net
Loading...