-
Notifications
You must be signed in to change notification settings - Fork 1.8k
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] expand_y=True to radios makes them expand horizontally other than vertically #5392
Comments
IMO, it is same issue as following two issues and still nothing changed.
import PySimpleGUI as sg
# these radio boxes also expand horizontally, despite expand_x=False
radio1 = sg.Radio("radio1", "g", background_color="blue", expand_y=True, key='R1')
radio2 = sg.Radio("radio2", "g", background_color="blue", expand_y=True, key='R2')
radio3 = sg.Radio("radio3", "g", background_color="blue", expand_y=True, key='R3')
col1 = sg.Col([[]], background_color="red", expand_x=True, size=(100, 100), key='C1')
radio4 = sg.Radio("radio4", "g", background_color="blue")
radio5 = sg.Radio("radio5", "g", background_color="blue")
radio6 = sg.Radio("radio6", "g", background_color="blue")
col2 = sg.Col([[]], background_color="red", expand_x=True, size=(100, 100), key='C2')
layout = [
[radio1, radio2, radio3, col1],
[radio4, radio5, radio6, col2],
[sg.Col([[]], size=(500, 100), background_color="red")]
]
window = sg.Window('Example', layout, finalize=True)
for key in ('R1', 'R2', 'R3'):
pack_info = window[key].Widget.pack_info()
pack_info['expand'] = 0
pack_info['before'] = window['C1'].Widget
window[key].Widget.pack(**pack_info)
while True:
event, values = window.read()
if event == sg.WIN_CLOSED:
window.close()
break |
I'm not sure how to get around the mixture problem at the moment. PySimpleGUI combines two tkinter concepts, expand and fill. There's also the problem of the row expanding causing the element to expand/fill. I need, as Jason has indicated, to put some time in on this. I see in the screenshot about the corrected radio buttons by changing the packing after the fact. I don't have a design yet that will do this as the window is being built. I'm sorry for the delay on these. Expand was added last year and it's not perfect. |
Type of Issue
BUG
Operating System
Windows 10
PySimpleGUI Port
tkinter
Versions
Python version
3.10
PySimpleGUI Version
4.59.0
GUI Version
tkinter
Troubleshooting
Detailed Description
expand_y=True
on radios makes them expand horizontally other than verticallyCode To Duplicate
The text was updated successfully, but these errors were encountered: