+ def CopyLog(self):
+ # build a newline and tab delimited string to put into the clipboard
+ if "unicode" in wx.PlatformInfo:
+ st = u""
+ else:
+ st = ""
+ for h in self.colHeaders:
+ st += h + "\t"
+ st += "\n"
+
+ for idx in range(self.GetItemCount()):
+ for col in range(self.GetColumnCount()):
+ item = self.GetItem(idx, col)
+ st += item.GetText() + "\t"
+ st += "\n"
+
+ data = wx.TextDataObject()
+ data.SetText(st)
+ if wx.TheClipboard.Open():
+ wx.TheClipboard.SetData(data)
+ wx.TheClipboard.Close()
+ else:
+ wx.MessageBox("Unable to open the clipboard", "Error")
+
+
+