Lines Matching full:wx
10 import wx
21 class SerialConfigDialog(wx.Dialog):
40 kwds["style"] = wx.DEFAULT_DIALOG_STYLE
41 wx.Dialog.__init__(self, *args, **kwds)
42 self.label_2 = wx.StaticText(self, -1, "Port")
43 self.choice_port = wx.Choice(self, -1, choices=[])
44 self.label_1 = wx.StaticText(self, -1, "Baudrate")
45 self.combo_box_baudrate = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN)
46 self.sizer_1_staticbox = wx.StaticBox(self, -1, "Basics")
47 self.panel_format = wx.Panel(self, -1)
48 self.label_3 = wx.StaticText(self.panel_format, -1, "Data Bits")
49 self.choice_databits = wx.Choice(self.panel_format, -1, choices=["choice 1"])
50 self.label_4 = wx.StaticText(self.panel_format, -1, "Stop Bits")
51 self.choice_stopbits = wx.Choice(self.panel_format, -1, choices=["choice 1"])
52 self.label_5 = wx.StaticText(self.panel_format, -1, "Parity")
53 self.choice_parity = wx.Choice(self.panel_format, -1, choices=["choice 1"])
54 self.sizer_format_staticbox = wx.StaticBox(self.panel_format, -1, "Data Format")
55 self.panel_timeout = wx.Panel(self, -1)
56 self.checkbox_timeout = wx.CheckBox(self.panel_timeout, -1, "Use Timeout")
57 self.text_ctrl_timeout = wx.TextCtrl(self.panel_timeout, -1, "")
58 self.label_6 = wx.StaticText(self.panel_timeout, -1, "seconds")
59 self.sizer_timeout_staticbox = wx.StaticBox(self.panel_timeout, -1, "Timeout")
60 self.panel_flow = wx.Panel(self, -1)
61 self.checkbox_rtscts = wx.CheckBox(self.panel_flow, -1, "RTS/CTS")
62 self.checkbox_xonxoff = wx.CheckBox(self.panel_flow, -1, "Xon/Xoff")
63 self.sizer_flow_staticbox = wx.StaticBox(self.panel_flow, -1, "Flow Control")
64 self.button_ok = wx.Button(self, wx.ID_OK, "")
65 self.button_cancel = wx.Button(self, wx.ID_CANCEL, "")
158 sizer_2 = wx.BoxSizer(wx.VERTICAL)
159 sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
161 sizer_flow = wx.StaticBoxSizer(self.sizer_flow_staticbox, wx.HORIZONTAL)
163 sizer_timeout = wx.StaticBoxSizer(self.sizer_timeout_staticbox, wx.HORIZONTAL)
165 sizer_format = wx.StaticBoxSizer(self.sizer_format_staticbox, wx.VERTICAL)
166 grid_sizer_1 = wx.FlexGridSizer(3, 2, 0, 0)
168 sizer_1 = wx.StaticBoxSizer(self.sizer_1_staticbox, wx.VERTICAL)
169 sizer_basics = wx.FlexGridSizer(3, 2, 0, 0)
170 sizer_basics.Add(self.label_2, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 4)
171 sizer_basics.Add(self.choice_port, 0, wx.EXPAND, 0)
172 sizer_basics.Add(self.label_1, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 4)
173 sizer_basics.Add(self.combo_box_baudrate, 0, wx.EXPAND, 0)
175 sizer_1.Add(sizer_basics, 0, wx.EXPAND, 0)
176 sizer_2.Add(sizer_1, 0, wx.EXPAND, 0)
177 grid_sizer_1.Add(self.label_3, 1, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 4)
178 grid_sizer_1.Add(self.choice_databits, 1, wx.EXPAND | wx.ALIGN_RIGHT, 0)
179 grid_sizer_1.Add(self.label_4, 1, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 4)
180 grid_sizer_1.Add(self.choice_stopbits, 1, wx.EXPAND | wx.ALIGN_RIGHT, 0)
181 grid_sizer_1.Add(self.label_5, 1, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 4)
182 grid_sizer_1.Add(self.choice_parity, 1, wx.EXPAND | wx.ALIGN_RIGHT, 0)
183 sizer_format.Add(grid_sizer_1, 1, wx.EXPAND, 0)
185 sizer_2.Add(self.panel_format, 0, wx.EXPAND, 0)
186 sizer_timeout.Add(self.checkbox_timeout, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 4)
188 sizer_timeout.Add(self.label_6, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 4)
190 sizer_2.Add(self.panel_timeout, 0, wx.EXPAND, 0)
191 sizer_flow.Add(self.checkbox_rtscts, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 4)
192 sizer_flow.Add(self.checkbox_xonxoff, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 4)
193 sizer_flow.Add((10, 10), 1, wx.EXPAND, 0)
195 sizer_2.Add(self.panel_flow, 0, wx.EXPAND, 0)
198 sizer_2.Add(sizer_3, 0, wx.ALL | wx.ALIGN_RIGHT, 4)
205 self.button_ok.Bind(wx.EVT_BUTTON, self.OnOK)
206 self.button_cancel.Bind(wx.EVT_BUTTON, self.OnCancel)
208 self.checkbox_timeout.Bind(wx.EVT_CHECKBOX, self.OnTimeout)
217 with wx.MessageDialog(
221 wx.OK | wx.ICON_ERROR) as dlg:
238 with wx.MessageDialog(
242 wx.OK | wx.ICON_ERROR) as dlg:
248 self.EndModal(wx.ID_OK)
251 self.EndModal(wx.ID_CANCEL)
262 class MyApp(wx.App):
265 wx.InitAllImageHandlers()
277 if result != wx.ID_OK:
285 if result != wx.ID_OK: