822 row, col = event.GetRow(), event.GetCol() |
822 row, col = event.GetRow(), event.GetCol() |
823 if self.Table.GetColLabelValue(col, False) == "Type": |
823 if self.Table.GetColLabelValue(col, False) == "Type": |
824 type_menu = wx.Menu(title='') |
824 type_menu = wx.Menu(title='') |
825 base_menu = wx.Menu(title='') |
825 base_menu = wx.Menu(title='') |
826 for base_type in self.Controler.GetBaseTypes(): |
826 for base_type in self.Controler.GetBaseTypes(): |
827 new_entry = base_menu.Append(help='', id=wx.ID_ANY, kind=wx.ITEM_NORMAL, text=base_type) |
827 new_entry = base_menu.Append(wx.ID_ANY, base_type) |
828 self.Bind(wx.EVT_MENU, self.GetVariableTypeFunction(base_type), new_entry) |
828 self.Bind(wx.EVT_MENU, self.GetVariableTypeFunction(base_type), new_entry) |
829 type_menu.AppendMenu(wx.ID_ANY, "Base Types", base_menu) |
829 type_menu.AppendMenu(wx.ID_ANY, "Base Types", base_menu) |
830 datatype_menu = wx.Menu(title='') |
830 datatype_menu = wx.Menu(title='') |
831 for datatype in self.Controler.GetDataTypes(): |
831 for datatype in self.Controler.GetDataTypes(): |
832 new_entry = datatype_menu.Append(help='', id=wx.ID_ANY, kind=wx.ITEM_NORMAL, text=datatype) |
832 new_entry = datatype_menu.Append(wx.ID_ANY, item=datatype) |
833 self.Bind(wx.EVT_MENU, self.GetVariableTypeFunction(datatype), new_entry) |
833 self.Bind(wx.EVT_MENU, self.GetVariableTypeFunction(datatype), new_entry) |
834 type_menu.AppendMenu(wx.ID_ANY, "User Data Types", datatype_menu) |
834 type_menu.AppendMenu(wx.ID_ANY, "User Data Types", datatype_menu) |
835 rect = self.VariablesGrid.BlockToDeviceRect((row, col), (row, col)) |
835 rect = self.VariablesGrid.BlockToDeviceRect((row, col), (row, col)) |
836 |
836 |
837 self.VariablesGrid.PopupMenu(type_menu, rect.x + rect.width, rect.y + self.VariablesGrid.GetColLabelSize()) |
837 self.VariablesGrid.PopupMenu(type_menu, rect.x + rect.width, rect.y + self.VariablesGrid.GetColLabelSize()) |