Hi
I麓m pretty new to python but I麓m liking it so far
I was wandering how I would go about making a filter option in a popupmenu
for a grid ( similar to that found in Access )
the popupmenu itself is done but how do I make an menuitem that has a
textctrl in it ? any ideas ?
I麓m using python 2.2.1 and wxPython 2.3.2.1
code for popupmenu to follow:
路路路
#***************************************************************************
***
def createPopupMenu(self,parent):
聽聽try:
聽聽聽聽self.popupMenu = wxMenu()
聽聽聽聽self.filterRemove =
wxMenuItem(self.popupMenu,wxID_WXFRAME_POPUPMENU_FILTER_REMOVE,"&Remove
Filter","Remove Filter")
聽聽聽聽self.filterBy =
wxMenuItem(self.popupMenu,wxID_WXFRAME_POPUPMENU_FILTER,"&Filter
by...","Filter by...")
聽聽聽聽self.popupMenu.Insert(0,self.filterRemove)
聽聽聽聽self.popupMenu.Insert(1,self.filterBy)
EVT_MENU(self.popupMenu,wxID_WXFRAME_POPUPMENU_FILTER_REMOVE,self.onFilterBy
Remove)
聽聽聽聽EVT_MENU(self.popupMenu,wxID_WXFRAME_POPUPMENU_FILTER,self.onFilterBy)
聽聽聽聽self.filterRemove.Enable(false)
聽聽聽聽self.filterBy.Enable(false)
聽聽except Exception,e:
聽聽聽聽self.parent.logger.exception("Unable to create popupmenu")
#***************************************************************************
***
def onFilterByRemove(self,event):
聽聽pass
#***************************************************************************
***
def onFilterBy(self,event):
聽聽pass
#***************************************************************************
***
regards