Description: |
If you "read the source, Luke" you will find three constraints on menus and
menubars discussed in the comments of generic/tkMenu.c. None of these are
mentioned in the documentation.
* In order to make the bindings for cascade menus work properly under Unix,
the cascade menus' pathnames must be proper children of the menu that they
are cascade from.
* Another constraint is that the menus used for menubars must be children
of the toplevel widget that they are attached to.
* And on the Macintosh, the platform specific menu handle for cascades
attached to a menu bar must have a title that matches the label for the
cascade menu.
I believe that the third constraint is handled automatically,
so there is no need for it to be mentioned in the documentation.
However, Nicolas Bats has provided a script which demonstrates that not
following the second constraint breaks the menubars on macOS. I will
attach his script.
|