What's the enum for a button press event in pygobject 3?

Chris Green cl at isbd.net
Thu Jul 30 06:09:41 EDT 2020


I am going round and round in steadily increasing frustration trying
to find the constants for button events in Pygobject/Gtk 3.

I have the following imports:-

    import gi
    gi.require_version('Gtk', '3.0')
    from gi.repository import Gtk
    from gi.repository import Gdk


The old GTK 2 code had (I think):-

    if (event.type == gtk.gdk.BUTTON_PRESS):


So what is BUTTON_PRESS in the new version, I simply can't find a
straightforward description of it or example of its use.


-- 
Chris Green
·


More information about the Python-list mailing list