MCPcopy Create free account
hub / github.com/Image-Py/imagepy / __init__

Method __init__

imagepy/ui/widgets/normal.py:57–75  ·  view source on GitHub ↗
(self, parent, title, unit)

Source from the content-addressed store, hash-verified

55class TextCtrl(wx.Panel):
56 """NumCtrl: diverid from wx.core.TextCtrl """
57 def __init__(self, parent, title, unit):
58 wx.Panel.__init__(self, parent)
59 sizer = wx.BoxSizer( wx.HORIZONTAL )
60 self.prefix = lab_title = wx.StaticText( self, wx.ID_ANY, title,
61 wx.DefaultPosition, wx.DefaultSize)
62
63 lab_title.Wrap( -1 )
64 sizer.Add( lab_title, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
65 self.ctrl = wx.TextCtrl(self, wx.TE_RIGHT)
66 sizer.Add( self.ctrl, 2, wx.ALL, 5 )
67
68 self.postfix = lab_unit = wx.StaticText( self, wx.ID_ANY, unit,
69 wx.DefaultPosition, wx.DefaultSize)
70
71 lab_unit.Wrap( -1 )
72 sizer.Add( lab_unit, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
73 self.SetSizer(sizer)
74
75 self.ctrl.Bind(wx.EVT_KEY_UP, self.ontext)
76
77 #! TODO: what is this?
78 def Bind(self, z, f):self.f = f

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
BindMethod · 0.45

Tested by

no test coverage detected