* lablgtk pango_parse_markup
@ 2010-11-29 14:20 Daniel de Rauglaudre
2010-11-30 3:20 ` [Caml-list] " Jacques Garrigue
[not found] ` <1084802834.912456.1291087242788.JavaMail.root@zmbs3.inria.fr>
0 siblings, 2 replies; 3+ messages in thread
From: Daniel de Rauglaudre @ 2010-11-29 14:20 UTC (permalink / raw)
To: caml-list
Hi,
I'd like to have a "label" widget in Lablgtk with a string with
internationalization, bold, italic, utf8, color, things like that.
I am not sure, but I saw in the Web that I must use the function
"pango_parse_markup" and XML tags in my string, but that function
seems not to exist in Lablgtk. Is it normal? Do I have to use other
features?
Thanks.
--
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] lablgtk pango_parse_markup
2010-11-29 14:20 lablgtk pango_parse_markup Daniel de Rauglaudre
@ 2010-11-30 3:20 ` Jacques Garrigue
[not found] ` <1084802834.912456.1291087242788.JavaMail.root@zmbs3.inria.fr>
1 sibling, 0 replies; 3+ messages in thread
From: Jacques Garrigue @ 2010-11-30 3:20 UTC (permalink / raw)
To: Daniel de Rauglaudre; +Cc: caml-list
This is directly supported by the label widget:
let w = GWindow.window ()
let l = GMisc.label ~packing:w#add ()
let () =
l#set_text "<span foreground=\"red\">Hello</span>";
l#set_use_markup true;
w#show ();
GMain.main ()
This is even shorter as optional argument:
let l = GMisc.label ~packing:w#add ~markup:"<span foreground=\"red\">Hello</span>" ()
Jacques Garrigue
On 2010/11/29, at 22:20, Daniel de Rauglaudre wrote:
> Hi,
>
> I'd like to have a "label" widget in Lablgtk with a string with
> internationalization, bold, italic, utf8, color, things like that.
>
> I am not sure, but I saw in the Web that I must use the function
> "pango_parse_markup" and XML tags in my string, but that function
> seems not to exist in Lablgtk. Is it normal? Do I have to use other
> features?
>
> Thanks.
>
> --
> Daniel de Rauglaudre
> http://pauillac.inria.fr/~ddr/
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <1084802834.912456.1291087242788.JavaMail.root@zmbs3.inria.fr>]
end of thread, other threads:[~2010-11-30 8:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-29 14:20 lablgtk pango_parse_markup Daniel de Rauglaudre
2010-11-30 3:20 ` [Caml-list] " Jacques Garrigue
[not found] ` <1084802834.912456.1291087242788.JavaMail.root@zmbs3.inria.fr>
2010-11-30 8:54 ` Daniel de Rauglaudre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox