-2

I'm fairly new to coding for Linux, and haven't done a lot of GUI programming. I've run into problems using Gnome Builder and programmatic access to UI widgets.

How the heck to you access a widget (built in a UI file and instantiated by widget templates in the *-window.c source file) to do anything with the widget? I could use gtk_builder calls in GTK3 to access widgets, but the GTK4 model is completely different, and I haven't found useful information that describes or demonstrates how to do it.

GlennP
  • 9
  • 4

1 Answers1

0

There are 2 ways of doing this in GTK (both 3 and 4) with UI files:

Usually, the second option is preferred, as it tends to lead to less boilerplate code

nielsdg
  • 2,318
  • 1
  • 13
  • 22
  • Thanks. That’s very helpful - and more useful than the GTK4 tutorial. The GNOME tutorial parallels the GTK tutorial, but is definitely more accessible. I hadn’t delved into the GNOME tutorial much because it started out looking a lot like the GTK tutorial… – GlennP Apr 11 '22 at 13:45