[Gtk-sharp-list] textbuffer urls

Chris Howie cdhowie at gmail.com
Tue Jun 23 11:34:35 EDT 2009

On Tue, Jun 23, 2009 at 11:20 AM, Evan Arnold<evan.arnold at gmail.com> wrote:
> Sorry, let me clarify (now, having had coffee).

I feel ya.  :)

> I have a textbuffer which is sort of working like a Rich Text Editor. Let's
> say a user adds a link to the textbuffer using the method you described up
> above.
> After text is entered in the textbuffer and the user hits submit, it moves
> into a treeview. I can swap <b> tags for bold texttags and <i> tags for
> italic texttags, but I am not sure what to do for places where a user has
> entered a link.
> Do you think there is sufficient flexibility in TreeView to show links as
> underlined and blue (shouldn't be too difficult) but also to have the
> on-click-opens-a-browser?
> Does that make more sense?

Yes, it does.  The visual representation should be no problem at all;
have a look at <http://library.gnome.org/devel/pango/stable/PangoMarkupFormat.html>.
 Wrapping the links in something like <span color="blue"
underline="single">...</span> will probably get you what you want

As far as the on-click handling I have to say that honestly I have no
idea how you're going to pull that off.  :)

Chris Howie

More information about the Gtk-sharp-list mailing list