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