Home > Back-end >  How to push buttons to the right PySimpleGUI?
How to push buttons to the right PySimpleGUI?

Time:11-06

Dears,

Could you please help to share ideas on how to push Buttons to the right? Knowing that I go through the forum and I find cases where no condition is set and this can be done using differents ways, like sg.push(), Sg.column(), justifications="right", but in my case bottouns are created based on one string as follows :

words= "S-C-I-E-N-C-E".split('-')

layout = [ [sg.Button(word, size=2) for word in words], => What to add in this line to make Buttons push to the right ?

Thanks in avdance

CodePudding user response:

Check out sg.Push in the enter image description here

You probably want something like:

layout = [sg.Text(''), sg.Push(), [sg.Button(word, size=2) for word in words]]
  • Related