| Home | Trees | Indices | Help |
|
|---|
|
|
1 import wx 2 import wx.aui 3 from reflectometry.model1d.model.bspline import BSpline, spline, slope, Slope 4 5 # ----------------------------------------------------------------------7105 106 107 108 # ------------------------------------------------------ 116 117 118 if __name__ == '__main__': 119 MyApp(0).MainLoop() 1208 - def __init__( 9 self, 10 parent, 11 ID=-1, 12 title = "Change Figure Title", 13 size = (400, 180), 14 pos = wx.DefaultPosition, 15 style = wx.DEFAULT_DIALOG_STYLE, 16 useMetal = False, 17 OldFig_Title = None 18 ):19 self.parent = parent 20 self.oldfig_title = OldFig_Title 21 22 23 pre = wx.PreDialog() 24 pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP) 25 pre.Create(parent, ID, title, pos, size, style) 26 27 self.PostCreate(pre) 28 29 # This extra style can be set after the UI object has been created. 30 if 'wxMac' in wx.PlatformInfo and useMetal: 31 self.SetExtraStyle(wx.DIALOG_EX_METAL) 32 33 self._mgr = wx.aui.AuiManager(self) 34 35 self.txts = [ r'Old Title:', r'New Title:' ] 36 37 for x in xrange( len(self.txts) ): 38 wx.StaticText(self, -1, self.txts[x], (20,30+x*30)) 39 40 41 self.textCtrls = [] 42 for x in xrange( 2): 43 textctl = wx.TextCtrl(self, 44 -1, 45 pos=(105, 30+x*30), 46 size=wx.Size(260, 20), 47 ) 48 self.textCtrls.append( textctl ) 49 50 51 self._mgr.Update() 52 53 for x in xrange( 2 ): 54 if self.oldfig_title == None: 55 self.textCtrls[x].SetValue( 'None' ) 56 else: 57 self.textCtrls[x].SetValue( self.oldfig_title ) 58 59 self.textCtrls[0].Enable(False) 60 61 self.button = wx.Button(self, 62 wx.ID_OK, 63 '', 64 (120, 100) 65 ) 66 self.cancelbutton = wx.Button(self, 67 wx.ID_CANCEL, 68 '', 69 (220, 100) 70 ) 71 72 self.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CLOSE, self.OnClosePage) 73 self.Bind(wx.EVT_CLOSE, self.OnClose)74 75 81 82 83 91 92 93 96 97 101 102
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Mar 17 14:22:17 2009 | http://epydoc.sourceforge.net |