Hyperlink in Comment Node

I’m looking to do a very simple comment node, but with the added feature of being able to have text typed in turn into a hyperlink if they type something that should be a hyperlink. For example, if they type “This is my search engine: http://www.google.com”, the url would be the only part that formatted itself in blue and clickable.

Is this possible?

Not if you are using a single GoText. You only get 1 font, 1 color.

Ok. What would you recommend using instead?

Add a link icon to the comment if you see an http: in the text? Something like that maybe.

Sorry, I’m not sure I understand. Are you saying use multiple objects for the comment? Keep in mind that the user will be able to type whatever they want in this comment.

I’ve seen an example of a Rich Text Box node in your samples and It does show the text the way I want it, it just doesn’t allow for clicking as far as I could tell. Does this sound like the route I should take?

I don’t recommend Rich Text Box.

I’m talking about something like this:

I suspect you can use the logic from DecoratedTextNode in NodeLinkDemo as a template.

Ok. I see what you’re saying now. Not really what I was looking for, but I may have to go that way as a last resort.

Out of curiosity, why do you not recommend the Rich Text Box for this requirement?

It’s a full fledged control, and GoDiagram does what it can, but embedding a full Windows Control inside a scaleable drawing surface like a GoView has issues. And… it supports URLs, but doesn’t seem to open a browser when you click on one.