101 |
101 |
wx.Panel.__init__(self, parent)
|
102 |
102 |
self.engine = engine
|
103 |
103 |
self.client = None
|
104 |
|
|
105 |
|
mainSizer = wx.GridBagSizer(5, 5)
|
|
104 |
sizer = wx.BoxSizer(wx.VERTICAL)
|
|
105 |
self.SetSizer(sizer)
|
106 |
106 |
|
107 |
107 |
# Input
|
|
108 |
s_input = wx.BoxSizer(wx.HORIZONTAL)
|
108 |
109 |
l_input = wx.StaticText(self, -1, "Input")
|
109 |
110 |
t_input = wx.TextCtrl(self, -1, "", size=(125, -1),
|
110 |
111 |
style=wx.TE_PROCESS_ENTER)
|
... | ... | |
118 |
119 |
t_password.Hide()
|
119 |
120 |
|
120 |
121 |
# Add the input field in the sizer
|
121 |
|
mainSizer.Add(l_input, pos=(0, 0))
|
122 |
|
mainSizer.Add(t_input, pos=(0, 1), span=(1, 6))
|
123 |
|
mainSizer.Add(l_password, pos=(0, 7))
|
124 |
|
mainSizer.Add(t_password, pos=(0, 8), span=(1, 2))
|
|
122 |
s_input.Add(l_input)
|
|
123 |
s_input.Add(t_input, proportion=4)
|
|
124 |
s_input.Add(l_password)
|
|
125 |
s_input.Add(t_password, proportion=2)
|
125 |
126 |
|
126 |
127 |
# Ouput
|
127 |
128 |
l_output = wx.StaticText(self, -1, "Output")
|
128 |
129 |
t_output = wx.TextCtrl(self, -1, "",
|
129 |
|
size=(600, 500), style=wx.TE_MULTILINE|wx.TE_READONLY)
|
|
130 |
size=(600, 400), style=wx.TE_MULTILINE|wx.TE_READONLY)
|
130 |
131 |
self.output = t_output
|
131 |
132 |
|
132 |
133 |
# Add the output fields in the sizer
|
133 |
|
mainSizer.Add(l_output, pos=(1, 0))
|
134 |
|
mainSizer.Add(t_output, pos=(10, 10))
|
|
134 |
sizer.Add(s_input)
|
|
135 |
sizer.Add(t_output, proportion=8)
|
135 |
136 |
|
136 |
137 |
# Event handler
|
137 |
138 |
t_input.Bind(wx.EVT_TEXT_ENTER, self.EvtText)
|
Set the ClientWindow in BoxSizers to improve accessibility