Esempio n. 1
0
class TensionsPage(wx.Panel):
  def __init__(self,parent):
    wx.Panel.__init__(self,parent)
    self.thePrevRow = -1
    self.thePrevCol = -1
    topSizer = wx.BoxSizer(wx.VERTICAL)
    cBox = wx.StaticBox(self,-1)
    cBoxSizer = wx.StaticBoxSizer(cBox,wx.HORIZONTAL)
    topSizer.Add(cBoxSizer,1,wx.EXPAND)
    self.tensionsCtrl = ValueTensionsGrid(self)
    self.tensionsCtrl.Bind(wx.grid.EVT_GRID_SELECT_CELL,self.onSelectRationale)
    cBoxSizer.Add(self.tensionsCtrl,1,wx.EXPAND)

    rBox = wx.StaticBox(self,-1,'Rationale')
    rBoxSizer = wx.StaticBoxSizer(rBox,wx.VERTICAL)
    topSizer.Add(rBoxSizer,1,wx.EXPAND)
    self.rationaleCtrl = wx.TextCtrl(self,ENVIRONMENT_TEXTTENSIONRATIONALE_ID,"",size=(200,100),style=wx.TE_MULTILINE)
    rBoxSizer.Add(self.rationaleCtrl,0,wx.EXPAND)
    self.tensionsCtrl.setRationaleCtrl(self.rationaleCtrl)
    self.SetSizer(topSizer)

  def onSelectRationale(self,evt):
    if (self.thePrevRow != -1 or self.thePrevCol != -1):
      lastRationale = self.rationaleCtrl.GetValue()
      self.tensionsCtrl.setRationale(self.thePrevRow,self.thePrevCol,lastRationale)
    currentRow = evt.GetRow()
    currentCol = evt.GetCol()
    tRat = self.tensionsCtrl.rationale(currentRow,currentCol)
    self.rationaleCtrl.SetValue(tRat)
    self.thePrevRow = currentRow
    self.thePrevCol = currentCol
    evt.Skip()
  def __init__(self,parent):
    wx.Panel.__init__(self,parent)
    self.thePrevRow = -1
    self.thePrevCol = -1
    topSizer = wx.BoxSizer(wx.VERTICAL)
    cBox = wx.StaticBox(self,-1)
    cBoxSizer = wx.StaticBoxSizer(cBox,wx.HORIZONTAL)
    topSizer.Add(cBoxSizer,1,wx.EXPAND)
    self.tensionsCtrl = ValueTensionsGrid(self)
    self.tensionsCtrl.Bind(wx.grid.EVT_GRID_SELECT_CELL,self.onSelectRationale)
    cBoxSizer.Add(self.tensionsCtrl,1,wx.EXPAND)

    rBox = wx.StaticBox(self,-1,'Rationale')
    rBoxSizer = wx.StaticBoxSizer(rBox,wx.VERTICAL)
    topSizer.Add(rBoxSizer,1,wx.EXPAND)
    self.rationaleCtrl = wx.TextCtrl(self,armid.ENVIRONMENT_TEXTTENSIONRATIONALE_ID,"",size=(200,100),style=wx.TE_MULTILINE)
    rBoxSizer.Add(self.rationaleCtrl,0,wx.EXPAND)
    self.tensionsCtrl.setRationaleCtrl(self.rationaleCtrl)
    self.SetSizer(topSizer)
class TensionsPage(wx.Panel):
  def __init__(self,parent):
    wx.Panel.__init__(self,parent)
    self.thePrevRow = -1
    self.thePrevCol = -1
    topSizer = wx.BoxSizer(wx.VERTICAL)
    cBox = wx.StaticBox(self,-1)
    cBoxSizer = wx.StaticBoxSizer(cBox,wx.HORIZONTAL)
    topSizer.Add(cBoxSizer,1,wx.EXPAND)
    self.tensionsCtrl = ValueTensionsGrid(self)
    self.tensionsCtrl.Bind(wx.grid.EVT_GRID_SELECT_CELL,self.onSelectRationale)
    cBoxSizer.Add(self.tensionsCtrl,1,wx.EXPAND)

    rBox = wx.StaticBox(self,-1,'Rationale')
    rBoxSizer = wx.StaticBoxSizer(rBox,wx.VERTICAL)
    topSizer.Add(rBoxSizer,1,wx.EXPAND)
    self.rationaleCtrl = wx.TextCtrl(self,armid.ENVIRONMENT_TEXTTENSIONRATIONALE_ID,"",size=(200,100),style=wx.TE_MULTILINE)
    rBoxSizer.Add(self.rationaleCtrl,0,wx.EXPAND)
    self.tensionsCtrl.setRationaleCtrl(self.rationaleCtrl)
    self.SetSizer(topSizer)

  def onSelectRationale(self,evt):
    if (self.thePrevRow != -1 or self.thePrevCol != -1):
      lastRationale = self.rationaleCtrl.GetValue()
      self.tensionsCtrl.setRationale(self.thePrevRow,self.thePrevCol,lastRationale)
    currentRow = evt.GetRow()
    currentCol = evt.GetCol()
    tRat = self.tensionsCtrl.rationale(currentRow,currentCol)
    self.rationaleCtrl.SetValue(tRat)
    self.thePrevRow = currentRow
    self.thePrevCol = currentCol
    evt.Skip()
Esempio n. 4
0
  def __init__(self,parent):
    wx.Panel.__init__(self,parent)
    self.thePrevRow = -1
    self.thePrevCol = -1
    topSizer = wx.BoxSizer(wx.VERTICAL)
    cBox = wx.StaticBox(self,-1)
    cBoxSizer = wx.StaticBoxSizer(cBox,wx.HORIZONTAL)
    topSizer.Add(cBoxSizer,1,wx.EXPAND)
    self.tensionsCtrl = ValueTensionsGrid(self)
    self.tensionsCtrl.Bind(wx.grid.EVT_GRID_SELECT_CELL,self.onSelectRationale)
    cBoxSizer.Add(self.tensionsCtrl,1,wx.EXPAND)

    rBox = wx.StaticBox(self,-1,'Rationale')
    rBoxSizer = wx.StaticBoxSizer(rBox,wx.VERTICAL)
    topSizer.Add(rBoxSizer,1,wx.EXPAND)
    self.rationaleCtrl = wx.TextCtrl(self,ENVIRONMENT_TEXTTENSIONRATIONALE_ID,"",size=(200,100),style=wx.TE_MULTILINE)
    rBoxSizer.Add(self.rationaleCtrl,0,wx.EXPAND)
    self.tensionsCtrl.setRationaleCtrl(self.rationaleCtrl)
    self.SetSizer(topSizer)