with
set ::tk::mac::useCustomMDEF 1
a menubutton posts its menu outside the right screen border if the menubutton is very close to the right screen border.
with
set ::tk::mac::useCustomMDEF 0
the menu will always be inside the screen border.
kind regards,
uwe