--- a/PLCOpenEditor.py Fri Jul 20 23:04:50 2007 +0200
+++ b/PLCOpenEditor.py Sat Jul 21 01:17:02 2007 +0200
@@ -1909,7 +1909,7 @@
def GetValue(self, row, col):
if row < self.GetNumberRows():
if col == 0:
- return "d"
+ return self.Parent.Values.index(self.data[row]) + 1
name = str(self.data[row].get(self.GetColLabelValue(col), ""))
return name
@@ -1976,7 +1976,7 @@
renderer = None
colname = self.GetColLabelValue(col)
grid.SetReadOnly(row, col, False)
- if colname == "Drag":
+ if col == 0:
grid.SetReadOnly(row, col, True)
elif colname == "Name":
if self.Parent.PouIsUsed and self.GetValueByName(row, "Class") in ["Input", "Output", "InOut"]:
@@ -2086,18 +2086,18 @@
# generated method, don't edit
parent.AddWindow(self.staticText1, 0, border=0, flag=wxALIGN_BOTTOM)
+ parent.AddWindow(self.ReturnType, 0, border=0, flag=0)
parent.AddWindow(self.staticText2, 0, border=0, flag=wxALIGN_BOTTOM)
- parent.AddWindow(self.ReturnType, 0, border=0, flag=0)
parent.AddWindow(self.ClassFilter, 0, border=0, flag=0)
def _init_coll_ButtonPanelSizer_Items(self, parent):
# generated method, don't edit
+ parent.AddWindow(self.UpButton, 0, border=0, flag=0)
parent.AddWindow(self.AddButton, 0, border=0, flag=0)
+ parent.AddWindow(self.DownButton, 0, border=0, flag=0)
parent.AddWindow(self.DeleteButton, 0, border=0, flag=0)
- parent.AddWindow(self.UpButton, 0, border=0, flag=0)
- parent.AddWindow(self.DownButton, 0, border=0, flag=0)
-
+
def _init_coll_ButtonPanelSizer_Growables(self, parent):
# generated method, don't edit
@@ -2113,11 +2113,11 @@
self.VariablePanelSizer = wx.FlexGridSizer(cols=2, hgap=10, rows=1, vgap=0)
- self.ControlPanelSizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=0)
-
- self.ChoicePanelSizer = wx.GridSizer(cols=2, hgap=5, rows=2, vgap=5)
-
- self.ButtonPanelSizer = wx.FlexGridSizer(cols=4, hgap=5, rows=1, vgap=0)
+ self.ControlPanelSizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=10)
+
+ self.ChoicePanelSizer = wx.GridSizer(cols=1, hgap=5, rows=4, vgap=5)
+
+ self.ButtonPanelSizer = wx.FlexGridSizer(cols=2, hgap=5, rows=2, vgap=0)
self._init_coll_MainPanelSizer_Items(self.MainPanelSizer)
self._init_coll_MainPanelSizer_Growables(self.MainPanelSizer)
@@ -2163,7 +2163,7 @@
self.ReturnType = wx.Choice(id=wxID_POUEDITORPANELRETURNTYPE,
name='ReturnType', parent=self, pos=wx.Point(0, 0),
- size=wx.Size(95, 24), style=0)
+ size=wx.Size(145, 24), style=0)
self.staticText2 = wx.StaticText(id=wxID_POUEDITORPANELSTATICTEXT2,
label='Class Filter:', name='staticText2', parent=self,
@@ -2171,12 +2171,12 @@
self.ClassFilter = wx.Choice(id=wxID_POUEDITORPANELCLASSFILTER,
name='ClassFilter', parent=self, pos=wx.Point(0, 0),
- size=wx.Size(95, 24), style=0)
+ size=wx.Size(145, 24), style=0)
EVT_CHOICE(self, wxID_POUEDITORPANELCLASSFILTER, self.OnClassFilter)
self.VariablesGrid = wx.grid.Grid(id=wxID_POUEDITORPANELVARIABLESGRID,
name='VariablesGrid', parent=self, pos=wx.Point(0, 0),
- size=wx.Size(-1, 150), style=wxVSCROLL|wxHSCROLL)
+ size=wx.Size(0, 150), style=wxVSCROLL)
self.VariablesGrid.SetFont(wx.Font(12, 77, wx.NORMAL, wx.NORMAL, False,
'Sans'))
self.VariablesGrid.SetLabelFont(wx.Font(10, 77, wx.NORMAL, wx.NORMAL,
@@ -2246,7 +2246,7 @@
self.DefaultTypes = {"All" : "Local", "Interface" : "Input", "Variables" : "Local"}
self.DefaultValue = {"Name" : "", "Class" : "", "Type" : "INT", "Location" : "", "Initial Value" : "", "Retain" : "No", "Constant" : "No"}
if pou_type in ["config", "resource"] or pou_type == "program":
- self.Table = VariableTable(self, [], ["Drag", "Name", "Class", "Type", "Location", "Initial Value", "Retain", "Constant"])
+ self.Table = VariableTable(self, [], ["#", "Name", "Class", "Type", "Location", "Initial Value", "Retain", "Constant"])
if pou_type not in ["config", "resource"]:
self.FilterChoices = ["All","Interface"," Input"," Output"," InOut"," External","Variables"," Local"," Temp","Global","Access"]
else:
@@ -2254,7 +2254,7 @@
self.ColSizes = [40, 80, 70, 80, 80, 80, 60, 70]
self.ColAlignements = [wxALIGN_CENTER, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_CENTER, wxALIGN_CENTER]
else:
- self.Table = VariableTable(self, [], ["Drag", "Name", "Class", "Type", "Initial Value", "Retain", "Constant"])
+ self.Table = VariableTable(self, [], ["#", "Name", "Class", "Type", "Initial Value", "Retain", "Constant"])
self.FilterChoices = ["All","Interface"," Input"," Output"," InOut"," External","Variables"," Local"," Temp"]
self.ColSizes = [40, 120, 70, 80, 120, 60, 70]
self.ColAlignements = [wxALIGN_CENTER, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_LEFT, wxALIGN_CENTER, wxALIGN_CENTER]