Changeset 764
- Timestamp:
- Jan 13, 2012 5:43:43 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified moxy/trunk/src/moxy/wx_motorpanel.py ¶
r763 r764 1 1 #!/usr/bin/env python 2 3 ########### SVN repository information ################### 4 # $Date$ 5 # $Author$ 6 # $Revision$ 7 # $URL$ 8 # $Id$ 9 ########### SVN repository information ################### 10 11 2 12 ''' 3 Creates a Frame containing one or more motor panels, per PyEpics description. 13 Creates a Frame containing one or more 14 motor panels, per PyEpics description. 4 15 5 16 http://cars9.uchicago.edu/software/python/pyepics3/wx.html#wxmotorpanel-widget 6 17 7 @author: jemian 18 Call this with a command such as one of these: 19 20 wx_motorpanel.py prefix:m1 prefix:m2 prefix:m3 prefix:m4 & 21 wx_motorpanel.py prefix:m{1,2,3,4} & 22 wx_motorpanel.py prj:m1 lax:m58:c2:m5 ioc:SM4 & 8 23 ''' 24 9 25 10 26 import wx … … 15 31 class MainFrame(wx.Frame): 16 32 def __init__(self, motor_pvs): 17 wx.Frame.__init__(self, None, title="wx_motorpanel") 33 title = "motors: " + " ".join(motor_pvs) 34 wx.Frame.__init__(self, None, title=title) 18 35 19 # Here we create a panel and a notebook on the panel36 # Put a panel on the Frame, it's good practice 20 37 p = wx.Panel(self) 21 38 sizer = wx.BoxSizer(orient=wx.VERTICAL) 39 p.SetSizer(sizer) 22 40 23 # create the motor panels as directed41 # create one motor subpanel for each pv 24 42 for pv in motor_pvs: 25 mp = epics.wx. motorpanel.MotorPanel(p, pv)43 mp = epics.wx.MotorPanel(p, pv) 26 44 sizer.Add(mp, 0, wx.EXPAND) 27 45 28 p.SetSizer(sizer) 29 self.Layout() 30 self.Fit() 46 p.Fit() # needed to get initial size right 47 self.Fit() # needed to get initial size right 31 48 32 49 … … 36 53 MainFrame(sys.argv[1:]).Show() 37 54 app.MainLoop() 38 39
Note: See TracChangeset
for help on using the changeset viewer.