How to get the name of Gtk.Widget extracted from the Builder object?
I mean the name visible in Glade (for example: button1 ), not the class name ( GtkWindow ).
button1
GtkWindow
This question is exactly the same as this one , but for Python with an introspection of GObject.
You cannot use the get_name method inherited from Gtk.Widget . Instead, you should use the get_name method defined in Gtk.Buildable , for example:
get_name
Gtk.Widget
Gtk.Buildable
button = builder.get_object("button1") print(Gtk.Buildable.get_name(button)) # prints "button1"
Source: https://habr.com/ru/post/902346/More articles:to track modified rows and manually update from Delta TClientDataSet - delphiPercentage of a number from another number - mathMap of sloth in clojure - clojureGtkBuilder and "names" - cA more efficient way to write this javascript is javascriptRead in bytearray for offset? - pythonWhat is the best way to get new content using JSON? - jsonhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/902349/passing-multiple-rails-variables-to-javascript&usg=ALkJrhi9172tniBDSN5UealkBuurPmdrfQTargeting selected text in javascript - javascriptHow to get group membership from kerberos ticket? - javaAll Articles