equal
deleted
inserted
replaced
48 @param controller: Reference to project controller |
48 @param controller: Reference to project controller |
49 @param tagname: Tagname of project POU edited |
49 @param tagname: Tagname of project POU edited |
50 @param type: Type of LD element ('contact or 'coil') |
50 @param type: Type of LD element ('contact or 'coil') |
51 """ |
51 """ |
52 BlockPreviewDialog.__init__(self, parent, controller, tagname, |
52 BlockPreviewDialog.__init__(self, parent, controller, tagname, |
53 size=wx.Size(350, 260 if type == "contact" else 310), |
53 size=wx.Size(350, 280 if type == "contact" else 330), |
54 title=(_("Edit Contact Values") |
54 title=(_("Edit Contact Values") |
55 if type == "contact" |
55 if type == "contact" |
56 else _("Edit Coil Values"))) |
56 else _("Edit Coil Values"))) |
57 |
57 |
58 # Init common sizers |
58 # Init common sizers |
89 element_variable_label = wx.StaticText(self, label=_('Variable:')) |
89 element_variable_label = wx.StaticText(self, label=_('Variable:')) |
90 self.LeftGridSizer.AddWindow(element_variable_label, border=5, |
90 self.LeftGridSizer.AddWindow(element_variable_label, border=5, |
91 flag=wx.GROW|wx.TOP) |
91 flag=wx.GROW|wx.TOP) |
92 |
92 |
93 # Create a combo box for defining LD element variable |
93 # Create a combo box for defining LD element variable |
94 self.ElementVariable = wx.ComboBox(self, style=wx.CB_READONLY) |
94 self.ElementVariable = wx.ComboBox(self, style=wx.CB_READONLY|wx.CB_SORT) |
95 self.Bind(wx.EVT_COMBOBOX, self.OnVariableChanged, |
95 self.Bind(wx.EVT_COMBOBOX, self.OnVariableChanged, |
96 self.ElementVariable) |
96 self.ElementVariable) |
97 self.LeftGridSizer.AddWindow(self.ElementVariable, border=5, |
97 self.LeftGridSizer.AddWindow(self.ElementVariable, border=5, |
98 flag=wx.GROW|wx.TOP) |
98 flag=wx.GROW|wx.TOP) |
99 |
99 |