Clickable text, Hyper text.

Example text:
“To bee or not to bee".

Say I have this text added to a textbox. How could I make the underlined words be clickable?

  • I can’t add a widget with clickable text to the textbox.
  • The words may need some data associated to them, but that’s optional.
  • Solution should of course be applicable to any text of any length.

In tricky way, add a fake border for handling mouse move events. Regarding to assocaited type(hyperlink or normal text), construct a different custom size widget and attach together and add to the parent as horizontial/wrap box.

Thats the video of how I used fake border:

It is not so fully dynamic but making fake border area could help you.

I have a similar method of doing clickable text, but that only works if those ‘helper widgets’ can be added to something like a horizontal/vertical box. What I am looking for is a solution to get specific text, words or sentences, inside a constantly changing textbox to be - or appear - clickable.

But you know, your mention of the wrap box planted a seed…
Which grew into:


Basically what I’m doing is:
DialogueWidget has a scrollbox where any paragraphs will be added to. The scrollbox is the black area.
ParagraphWidget (Inside the red squares) is a wrapbox, which texts are added to.
TextWidget (inside yellow squares) contains the text, onclicked functions and ID.

That’s pretty much it.

As you can see it’s not perfect; i’d like the texts to wrap properly instead of being in these predefined chunks. if that could be solved I think I would use this method.
Also, this does not make text wrap. Update: I checked the wrong wrap checkbox. The one under wrapping should be used and a number needs to be set.


But what’s up with those two? The upper right I get, but the lower left?

Last update:

I can conclude that it’s not actually working. It felt like I was doing progress but the text blocks wrap randomly and unpredictably, and texts often can’t be seamless as you can see in the picture.

So still looking for options.


In another opinion, roughly;
**Reconstruct **the widget when any text changed with structure.

Message Struct consist of two data members
string Message
bool bIsHyperlink

You have to expose Message Struct when creating the widget.

When text changed, the widget will construct again and text overflows automatically changed.