mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
- Latest Phoenix development integrated in the documentation builder; - Added the latest `BitmapComboBox`, `RichToolTip` etc..., with their sample; - Adapted the existing `adv` samples to use `wx.adv` in the code; - Fixed wrong rendering of various snippets. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
18 lines
754 B
Python
18 lines
754 B
Python
|
|
def OnSaveAs(self, event):
|
|
|
|
saveFileDialog = wx.FileDialog(self, "Save XYZ file", "", "",
|
|
"XYZ files (*.xyz)|*.xyz", wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
|
|
|
|
if saveFileDialog.ShowModal() == wx.ID_CANCEL:
|
|
return # the user changed idea...
|
|
|
|
# save the current contents in the file
|
|
# this can be done with e.g. wxPython output streams:
|
|
output_stream = wx.FileOutputStream(saveFileDialog.GetPath())
|
|
|
|
if not output_stream.IsOk():
|
|
wx.LogError("Cannot save current contents in file '%s'."%saveFileDialog.GetPath())
|
|
return
|
|
|