Search code examples
cgtkvalapango

Insert an image inside a GtkLabel?


I would like to insert an image inside a GtkLabel but the <image> tag doesn't exists in Pango. I also tried to using the hacky way that consist of having a <span class="image"></span> and setting it a background-image via the CSS but class="" isn't a valid Pango attribute.

My question is: Is their a way to insert an image inside a label ? Not before or after but inside. Basically i would like to add emojis in my instant messenger messages.

I searched the web, and here but doesn't found a solution that fit my needs. :/

Thanks in advance for replies.


Solution

  • It seem that doing this isn't possible. The proper way to do it seems to be using a GtkTextView. For peoples that are running into the same issue of me, just run gtk3-demo → Text View → Multiple Views.