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

Method __init__

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

Source from the content-addressed store, hash-verified

89class ColorCtrl(wx.Panel):
90 """ColorCtrl: deverid fron wx.coreTextCtrl"""
91 def __init__(self, parent, title, unit):
92 wx.Panel.__init__(self, parent)
93 sizer = wx.BoxSizer( wx.HORIZONTAL )
94 self.prefix = lab_title = wx.StaticText( self, wx.ID_ANY, title,
95 wx.DefaultPosition, wx.DefaultSize)
96 lab_title.Wrap( -1 )
97 sizer.Add( lab_title, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
98 self.ctrl = wx.TextCtrl(self, wx.TE_RIGHT)
99 sizer.Add( self.ctrl, 2, wx.ALL, 5 )
100 self.postfix = lab_unit = wx.StaticText( self, wx.ID_ANY, unit,
101 wx.DefaultPosition, wx.DefaultSize)
102 lab_unit.Wrap( -1 )
103 sizer.Add( lab_unit, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
104 self.SetSizer(sizer)
105
106 self.ctrl.Bind(wx.EVT_KEY_UP, self.ontext)
107 self.ctrl.Bind( wx.EVT_LEFT_DOWN, self.oncolor)
108
109 def Bind(self, z, f):
110 self.f = f

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45
BindMethod · 0.45

Tested by

no test coverage detected