I've spent the better part of half a day solving what really ought to a have been a trivial problem. Well, the solution was trivial but tracking down the cause of it all was very frustrating indeed!
Consider this:
set menu [gnoc::menu]
Hitherto, in order to be compliant with now ancient formatting practices, a menu automatically has a tearoff item place at position 0 in the children list. So, to hide it, because we don't want one use:
set menu [gnoc::menu -tearoff 0]
or
set menu [gnoc::menu]
$menu configure -tearoff 0]
So far, so good. But, if the gnocl::application command is used to produce a working UI framework, and extra widgets including addition menu bar items, and the show subcommand used for the application toplevel then BOOM!
The recently made menus without tearoffs suddenly got tearoffs again. 😠
The issue was that the existing menu.c configure function simply hid or showed the default tearoff item. This needs to be created or destroyed when needed.
Well, job done now. Onwards and upwards!
Comments