Code generated form with multiple components on single line

Use a Grid Panel :

This will add a label and a text box on the same line (extracted from a project and modified for simplicity) :

  lbl = Label(text="My Label")
  self.grid_panel_1.add_component(lbl, col_xs=0, width_xs=6)
        
  tb = TextBox(text="My Text Box")
  self.grid_panel_1.add_component(tb, col_xs=6, width_xs=6)

It’s the only way I know how to do it, and it’s the recommended way :

1 Like