code: def _update_alignment(self, alignment):
          
  
          states = {"top": 2, "middle": 0, "bottom": 1}
  
          self.alignment_tb.state = states[alignment]
  
          self.alignment_tb.toggle(None)
          self.alignment_tb.Refresh()
docs: Updates vertical text alignment button
  
          Parameters
          ----------
  
          alignment: String in ["top", "middle", "right"]
          \tSwitches button to untoggled if False and toggled if True