605 for col in range(self.GetNumberCols()): |
605 for col in range(self.GetNumberCols()): |
606 editor = None |
606 editor = None |
607 renderer = None |
607 renderer = None |
608 colname = self.GetColLabelValue(col, False) |
608 colname = self.GetColLabelValue(col, False) |
609 |
609 |
610 if colname in ["Name", "Initial"]: |
610 if colname in ["Name", "Initial", "Description", "OnChange", "Options"]: |
611 editor = wx.grid.GridCellTextEditor() |
611 editor = wx.grid.GridCellTextEditor() |
612 elif colname == "Class": |
612 elif colname == "Class": |
613 editor = wx.grid.GridCellChoiceEditor() |
613 editor = wx.grid.GridCellChoiceEditor() |
614 editor.SetParameters("input,memory,output") |
614 editor.SetParameters("input,memory,output") |
615 elif colname == "Type": |
615 elif colname == "Type": |
656 self.SetSizer(main_sizer) |
656 self.SetSizer(main_sizer) |
657 |
657 |
658 self.ParentWindow = window |
658 self.ParentWindow = window |
659 self.Controler = controler |
659 self.Controler = controler |
660 |
660 |
661 self.VariablesDefaultValue = {"Name" : "", "Type" : DefaultType, "Initial": ""} |
661 self.VariablesDefaultValue = {"Name" : "", "Type" : DefaultType, "Initial": "", |
662 self.Table = VariablesTable(self, [], ["#", "Name", "Type", "Initial"]) |
662 "Description":"", "OnChange":"", "Options":""} |
663 self.ColAlignements = [wx.ALIGN_RIGHT, wx.ALIGN_LEFT, wx.ALIGN_LEFT, wx.ALIGN_LEFT] |
663 self.Table = VariablesTable(self, [], ["#", "Name", "Type", "Initial", |
664 self.ColSizes = [40, 200, 150, 150] |
664 "Description", "OnChange", "Options"]) |
|
665 self.ColAlignements = [wx.ALIGN_RIGHT] + \ |
|
666 [wx.ALIGN_LEFT]*(len(self.VariablesDefaultValue)) |
|
667 self.ColSizes = [20, 150] + [100]*(len(self.VariablesDefaultValue)-1) |
665 self.VariablesGrid.SetTable(self.Table) |
668 self.VariablesGrid.SetTable(self.Table) |
666 self.VariablesGrid.SetButtons({"Add": self.AddVariableButton, |
669 self.VariablesGrid.SetButtons({"Add": self.AddVariableButton, |
667 "Delete": self.DeleteVariableButton, |
670 "Delete": self.DeleteVariableButton, |
668 "Up": self.UpVariableButton, |
671 "Up": self.UpVariableButton, |
669 "Down": self.DownVariableButton}) |
672 "Down": self.DownVariableButton}) |