code: def on_page_layout_choice(self, event):
          
  
          width, height = self.paper_sizes_points[event.GetString()]
          self.page_width_text_ctrl.SetValue(str(width / 72.0))
          self.page_height_text_ctrl.SetValue(str(height / 72.0))
  
          event.Skip()
docs: Page layout choice event handler