wxmenu not hiding

Hello,

I’m trying to hide my wxmenu. I do roughly the below. As far as I can tell the menu should disappear

OnButton(self, evt):

if menu.IsShown()

menu.Show(False)

print menu.IsShown() >> False

menu.Show(True)

print menu.IsShown() >> True