Re: Using Gtk.Builder to create a menubar.



Better to include the actual code as text (no attachment) so that people
do not have to chase around for it.

Op 22-04-18 om 12:29 schreef c buhtz posteo jp:
No I try to use Gtk.Builder to create a menubar. It is not working
because the documentation is not clear for me. There is no exapmle for
a IMO usual thing like a menubar.

|Traceback(most recent call last):File"./_menubar.py",line
47,in<module>win =Window()File"./_menubar.py",line 31,in__init__
builder.add_action_group(action_group)AttributeError:'Builder'object has
no attribute 'add_action_group'|


Where did you find add_action_group it is nowhere in the documentation
[1]. There is insert_action_group which can be used on a Gtk.Widget and
Gtk.UIManager.

You may want to work through [2] as it deals with the basic questions
about Gtk+3 and Python including UIManager and Actions.

~infirit

[1] https://lazka.github.io/pgi-docs/
[2] https://python-gtk-3-tutorial.readthedocs.io/en/latest/index.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]