equal
deleted
inserted
replaced
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
24 |
24 |
25 |
25 |
26 from __future__ import absolute_import |
26 from __future__ import absolute_import |
27 import re |
27 import re |
|
28 from builtins import str as text |
28 |
29 |
29 import wx |
30 import wx |
30 import wx.grid |
31 import wx.grid |
31 import wx.stc as stc |
32 import wx.stc as stc |
32 import wx.lib.buttons |
33 import wx.lib.buttons |
33 from six.moves import xrange |
34 from six.moves import xrange |
|
35 |
34 |
36 |
35 from plcopen.plcopen import TestTextElement |
37 from plcopen.plcopen import TestTextElement |
36 from plcopen.structures import TestIdentifier, IEC_KEYWORDS, DefaultType |
38 from plcopen.structures import TestIdentifier, IEC_KEYWORDS, DefaultType |
37 from controls import CustomGrid, CustomTable |
39 from controls import CustomGrid, CustomTable |
38 from controls.CustomStyledTextCtrl import CustomStyledTextCtrl, faces, GetCursorPos, NAVIGATION_KEYS |
40 from controls.CustomStyledTextCtrl import CustomStyledTextCtrl, faces, GetCursorPos, NAVIGATION_KEYS |
628 def GetValue(self, row, col): |
630 def GetValue(self, row, col): |
629 if row < self.GetNumberRows(): |
631 if row < self.GetNumberRows(): |
630 if col == 0: |
632 if col == 0: |
631 return row + 1 |
633 return row + 1 |
632 else: |
634 else: |
633 return unicode(self.data[row].get(self.GetColLabelValue(col, False), "")) |
635 return text(self.data[row].get(self.GetColLabelValue(col, False), "")) |
634 |
636 |
635 def _updateColAttrs(self, grid): |
637 def _updateColAttrs(self, grid): |
636 """ |
638 """ |
637 wxGrid -> update the column attributes to add the |
639 wxGrid -> update the column attributes to add the |
638 appropriate renderer given the column name. |
640 appropriate renderer given the column name. |