I am having a problem using EVT_UPDATE_UI. Specifically, my update methods
appear to never get called. Here is a small sample of how one menu is built,
and how the method is defined:
#make Script menu
self.menuS = wxMenu()
self.ScriptRun = self.menuS.Append(ID_SCRIPT_RUN, '&Run...', 'Run
the current script')
self.menuS.Append(ID_SCRIPT_IMPORT, '&Import', 'Import the current
script')
self.menuS.AppendSeparator()
EVT_MENU(self, ID_SCRIPT_RUN, self.OnScriptRun)
EVT_UPDATE_UI(self, ID_SCRIPT_RUN, self.OnScriptRunUpdateUI)
EVT_MENU(self, ID_SCRIPT_IMPORT, self.OnScriptImport)
self.mainmenu.Append(self.menuS, '&Script')
....
....
def OnScriptRun(self, event):
print 'OnScriptRun' #for testing
def OnScriptRunUpdateUI(self, event):
print 'OnScriptRunUpdateUI event' #for testing
The menus are defined in the standard way (following the example in the
demo), OnIdle is defined using the demo example, etc.
I am not new to GUI development, yet I am definitely missing something here!
Does anyone have any working samples? I have not been able to find any.
Thanks in advance.
-Ron
···
___________________________________________
Ron Clarke
Inkjet Publishing Division
Hewlett-Packard Co.
ron_clarke@hp.com
ecard - https://ecardfile.com/id/ron_clarke