1 year ago

#322078

test-img

Robert Siemer

How to replace some text parts at runtime in a GTK user interface?

I’m newish to GTK programming and am working on a simple UI (python). I have a Gtk.Assistant() with Gtk.Label()s as pages. I use the labels to show some text.

Is there some text-template mechanism in GTK to replace parts of text without assigning the entire label text again? I’ve seen the pango markup, but that one does not give access to content parts like the browser DOM does. And there is that MVC part of GTK, with TreeView and ListStore, but its complexity is not what will make this simple task shorter: replace a placeholder with a number (for example).

So, is there some simple MVC aspect in GTK I’m not aware of?

templates

gtk

gtk3

pygobject

0 Answers

Your Answer

Accepted video resources