editors/CodeFileEditor.py
branchpython3
changeset 3752 9f6f46dbe3ae
parent 3750 f62625418bff
child 3795 223a91584172
equal deleted inserted replaced
3751:a80a66ba52d6 3752:9f6f46dbe3ae
    21 # You should have received a copy of the GNU General Public License
    21 # You should have received a copy of the GNU General Public License
    22 # along with this program; if not, write to the Free Software
    22 # along with this program; if not, write to the Free Software
    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 
       
    27 
       
    28 import re
    26 import re
    29 from builtins import str as text
       
    30 
    27 
    31 import wx
    28 import wx
    32 import wx.grid
    29 import wx.grid
    33 import wx.stc as stc
    30 import wx.stc as stc
    34 import wx.lib.buttons
    31 import wx.lib.buttons
    35 from six.moves import xrange
       
    36 
    32 
    37 
    33 
    38 from plcopen.plcopen import TestTextElement
    34 from plcopen.plcopen import TestTextElement
    39 from plcopen.structures import TestIdentifier, IEC_KEYWORDS, DefaultType
    35 from plcopen.structures import TestIdentifier, IEC_KEYWORDS, DefaultType
    40 from controls import CustomGrid, CustomTable
    36 from controls import CustomGrid, CustomTable
   634     def GetValue(self, row, col):
   630     def GetValue(self, row, col):
   635         if row < self.GetNumberRows():
   631         if row < self.GetNumberRows():
   636             if col == 0:
   632             if col == 0:
   637                 return row + 1
   633                 return row + 1
   638             else:
   634             else:
   639                 return text(self.data[row].get(self.GetColLabelValue(col, False), ""))
   635                 return str(self.data[row].get(self.GetColLabelValue(col, False), ""))
   640 
   636 
   641     def _updateColAttrs(self, grid):
   637     def _updateColAttrs(self, grid):
   642         """
   638         """
   643         wxGrid -> update the column attributes to add the
   639         wxGrid -> update the column attributes to add the
   644         appropriate renderer given the column name.
   640         appropriate renderer given the column name.