It really depends on your use case. Say for example, you are building something like an internet search engine and you want to display the results. I’d personally go with a “SearchResult” button widget that displays the title and description of a result and when clicked opens it in a browser. Then I’d use a recycler view like GtkListView to display them (see A primer on GtkListView – GTK Development Blog). I don’t think a big TextView or Label would be appropriate for this case.
Q1.
See gtk4-demo’s Hypertext demo on how to create and handle link tags.
Q2.
You can give it a try with the maximum input you think your app will handle and see how it works out.
Q3.
Not sure what you mean exactly with that, like a button that shows the links in a different view/dialog?
in Q3,
What I meant by that vague vision was a javascript-like approach – instinctive
But listbox and rows are really perfect…
I’m making GTK4 UI for an old and cool app and it also uses something like a listbox… not a textview-like thing…
listview is not the exact same thing as listbox, right?
Since you mentioned that the list of items can be big, I’d suggested looking into ListView sooner than later.
Read this for a deep dive into the differences and limitations Scalable lists in GTK 4 – GTK Development Blog, but TLDR, ListView is a recycler view; it will create up to 200 rows and re-use them as you scroll, which has many benefits on performance and resource usage.
The downside is that they are a bit more complex and limiting than a ListBox but you can always look at real-world examples in other projects, if the pygobject docs don’t cover it (Code search results · GitHub)