def GetTextCtrlCallBackFunction(self, textctrl, path, refresh=False):
def OnTextCtrlChanged(event):
res = self.SetConfNodeParamsAttribute(path, textctrl.GetValue())
if res != textctrl.GetValue():
if isinstance(textctrl, wx.SpinCtrl):
textctrl.SetValue(res)
elif res is not None:
textctrl.ChangeValue(str(res))
if refresh:
wx.CallAfter(self.ParentWindow._Refresh, TITLE, FILEMENU, PROJECTTREE, PAGETITLES)
wx.CallAfter(self.ParentWindow.SelectProjectTreeItem, self.GetTagName())
event.Skip()
return OnTextCtrlChanged
评论列表
文章目录