Skip to content
Advertisement

Align image center pysimpleGui

I use image (and button) as so:

JavaScript

How do I align the myImg to center? I tried google can’t find anything on how to do it. I read somebody suggested justification=’center’ but I don’t know where to put that. I tried [myImg, justification=’center’] didn’t work just crash the app.

Advertisement

Answer

Based on documentation you can use Column with justification='center' to center widgets.

It needs list of rows – like [[my_img]]

But it centers column in window, not widgets in column
so for row with Button it can need separated Column.

JavaScript

enter image description here


BTW:

justification='center' can be used also in Text to center text.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement