Adding this code to CloseWindow will save the text in the clipboard to the global clipboard.
local clipBoard = wx.wxClipboard.Get() local editor = GetEditor() if editor:CanPaste() and clipBoard and clipBoard:Open() then -- We are pasting into the current document but it will be thrown away editor:SelectAll(); editor:Paste(); clipBoard.Get():SetData(wx.wxTextDataObject(editor.Text)) clipBoard.Get():Flush() clipBoard.Get():Close() end Andre PS: Tested only on window. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users