--- a/dialogs/ConnectionDialog.py Thu Sep 02 21:36:29 2021 +0200
+++ b/dialogs/ConnectionDialog.py Thu Sep 02 22:18:14 2021 +0200
@@ -59,7 +59,7 @@
# Create label for connection type
type_label = wx.StaticText(self, label=_('Type:'))
- self.LeftGridSizer.AddWindow(type_label, flag=wx.GROW)
+ self.LeftGridSizer.Add(type_label, flag=wx.GROW)
# Create radio buttons for selecting connection type
self.TypeRadioButtons = {}
@@ -70,27 +70,27 @@
style=(wx.RB_GROUP if first else 0))
radio_button.SetValue(first)
self.Bind(wx.EVT_RADIOBUTTON, self.OnTypeChanged, radio_button)
- self.LeftGridSizer.AddWindow(radio_button, flag=wx.GROW)
+ self.LeftGridSizer.Add(radio_button, flag=wx.GROW)
self.TypeRadioButtons[type] = radio_button
first = False
# Create label for connection name
name_label = wx.StaticText(self, label=_('Name:'))
- self.LeftGridSizer.AddWindow(name_label, flag=wx.GROW)
+ self.LeftGridSizer.Add(name_label, flag=wx.GROW)
# Create text control for defining connection name
self.ConnectionName = wx.TextCtrl(self)
self.ConnectionName.SetMinSize(wx.Size(200, -1))
self.Bind(wx.EVT_TEXT, self.OnNameChanged, self.ConnectionName)
- self.LeftGridSizer.AddWindow(self.ConnectionName, flag=wx.GROW)
+ self.LeftGridSizer.Add(self.ConnectionName, flag=wx.GROW)
# Add preview panel and associated label to sizers
self.Preview.SetMinSize(wx.Size(-1, 100))
- self.LeftGridSizer.AddWindow(self.PreviewLabel, flag=wx.GROW)
- self.LeftGridSizer.AddWindow(self.Preview, flag=wx.GROW)
+ self.LeftGridSizer.Add(self.PreviewLabel, flag=wx.GROW)
+ self.LeftGridSizer.Add(self.Preview, flag=wx.GROW)
# Add buttons sizer to sizers
- self.MainSizer.AddSizer(
+ self.MainSizer.Add(
self.ButtonSizer, border=20,
flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.ColumnSizer.RemoveSizer(self.RightGridSizer)
@@ -99,10 +99,10 @@
# of POU
if apply_button:
self.ApplyToAllButton = wx.Button(self, label=_("Propagate Name"))
- self.ApplyToAllButton.SetToolTipString(
+ self.ApplyToAllButton.SetToolTip(
_("Apply name modification to all continuations with the same name"))
self.Bind(wx.EVT_BUTTON, self.OnApplyToAll, self.ApplyToAllButton)
- self.ButtonSizer.AddWindow(self.ApplyToAllButton, flag=wx.LEFT)
+ self.ButtonSizer.Add(self.ApplyToAllButton, flag=wx.LEFT)
else:
self.ConnectionName.ChangeValue(
controller.GenerateNewName(