def SetCopyBuffer(self, text, primary_selection=False):
if primary_selection and wx.Platform == '__WXMSW__':
return
else:
wx.TheClipboard.UsePrimarySelection(primary_selection)
if wx.TheClipboard.Open():
data = wx.TextDataObject()
data.SetText(text)
wx.TheClipboard.SetData(data)
wx.TheClipboard.Flush()
wx.TheClipboard.Close()
self.RefreshEditMenu()
评论列表
文章目录