Exemple #1
0
  def __init__(self, *args, **kwargs):
    ViewControl.__init__ (self, *args, **kwargs)

    # back and forward buttons
    self.back = wx.Button (self, label = "Zurück")
    self.forward = wx.Button (self, label = "Weiter")

    self.Bind (wx.EVT_BUTTON, self.onBack, self.back)
    self.Bind (wx.EVT_BUTTON, self.onForward, self.forward)

    # additional sizer
    self.buttonSizer = wx.BoxSizer (wx.HORIZONTAL)

    self.mainSizer.Add (self.buttonSizer)

    # add buttons to buttonSizer
    self.buttonSizer.Add (self.back)
    self.buttonSizer.Add (self.forward)
Exemple #2
0
  def switchSubPanelByID (self, number):
    if number < self.pool.lower_bound or number > self.pool.upper_bound:
      # TODO hier sollte eine sinnvolle Fehlermeldung erscheinen
      raise IndexError ("Hier sollte eine sinnvolle Fehlermeldung stehen")   

    if ViewControl.switchSubPanelByID (self, number):
      self.currentNumber = number
      if number - 1 < self.pool.lower_bound:
        self.back.Disable ()
      else:
        self.back.Enable ()

      if number + 2 > self.pool.upper_bound:
        self.forward.Disable ()
      else:
        self.forward.Enable ()
 def __init__(self, *args, **kwargs):
   self.type = args[1]
   ViewControl.__init__(self, *args, **kwargs)