logo       

Re: easy hyperlink builder (email-http link): msg#00144

gnome.gtk+.python

Subject: Re: easy hyperlink builder (email-http link)

David Eriksson wrote:

On Sun, 2004-12-26 at 12:33 -0500, Francis Lavoie wrote:

Is there an easy way to put mail link and http link on a textlabel?

I use pango markup like this : <span foreground="#000099" underline="single" weight="bold">francis@xxxxxxxxxx</span>

but it's not automaticly clickable to open the default mail-client.
And it is not theme-friendly

Is there another way to go that I mist?


Use a GnomeHRef widget? I still had to use pango makeup to make it look
like a clickable link, though:

label = self.href.get_child()
label.set_text("<span foreground=\"blue\" underline=\"single\">" +
label.get_text() + "</span>")
label.set_use_markup(True)



Ok, I'm quite new to graphical programming. I tried that solution, but if I call the label from my glade object it doesn't work. So I guest I have more reading to do. I will pass through the tutorial and keep your answer in my note to use it in my program.

Thank you

_______________________________________________
pygtk mailing list pygtk@xxxxxxxxxx
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise