Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Bug/Question] Radio element size parameter

Abierto
#6,569 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
python
Área
desktop

Línea de trabajo

Comienza ejecutando en Windows la reproducción proporcionada con sg.Radio y sg.Window usando el port de tkinter y, a continuación, inspecciona el manejo del tamaño del elemento Radio. Compara las dimensiones solicitadas del botón y del texto con el comportamiento observado; se considera terminado cuando se hayan establecido las semánticas de tamaño esperadas y el issue esté aclarado o cubierto por una prueba de regresión adecuada.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Bug Port - TK
Type of Issue ( Bug, Question)

Bug/Question

Operating System

Windows

PySimpleGUI Port (tkinter, Qt, Wx, Web)

tkinter

Versions

Version information can be obtained by calling sg.main_get_debug_data()
Or you can print each version shown in ()

Python version (sg.sys.version)

3.10.12

PySimpleGUI Version (sg.__version__)

4.60.5

GUI Version (tkinter (sg.tclversion_detailed), PySide2, WxPython, Remi)

tkinter version: 8.6.12


Your Experience In Months or Years (optional)

Years Python programming experience

5

Years Programming experience overall

7

Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)

no

Anything else you think would be helpful?


Troubleshooting

These items may solve your problem. Please check those you've done by changing - [ ] to - [X]

  • Searched main docs for your problem www.PySimpleGUI.org
  • Looked for Demo Programs that are similar to your goal. It is recommend you use the Demo Browser! Demos.PySimpleGUI.org
  • None of your GUI code was generated by an AI algorithm like GPT
  • If not tkinter - looked for Demo Programs for specific port
  • For non tkinter - Looked at readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
  • Run your program outside of your debugger (from a command line)
  • Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.org
  • Have upgraded to the latest release of PySimpleGUI on PyPI (lastest official version)
  • Tried using the PySimpleGUI.py file on GitHub. Your problem may have already been fixed but not released
Detailed Description

I am using the radio button element, but the size parameter doesn't do what i thought it should. I thought it should make the button itself larger, but it only affects the size of the text next to the button. Also it seems as if the text is only effected by the width parameter and not the height. This may not be the case and the height only gets triggered by text overflow in the width.

Code To Duplicate

A short program that isolates and demonstrates the problem (Do not paste your massive program, but instead 10-20 lines that clearly show the problem)

This pre-formatted code block is all set for you to paste in your bit of code:


import PySimpleGUI as sg


sg.theme('SystemDefaultForReal')  # please make your windows colorful
header_font_4 = {'font': ('Calibri',20,'bold')}
radio_format = {'group_id': 1, 'size': (1,1)}
radio_1 = [[sg.Radio('Hello', group_id=1,size=(2,2))],
         [sg.Radio('Hello Again', group_id=1,size=(10,10))],
         [sg.Radio('Goodbye', group_id=1,size=(100,100))]]
layout = [[sg.Frame('',radio_1)]]

window = sg.Window('Window Title', layout).Finalize()

while True:  # Event Loop
    event, values = window.read()
    print(event, values)
    if event == sg.WIN_CLOSED or event == 'Exit':
        break
    if event == 'Show':
        # change the "output" element to be the value of "input" element
        window['-OUTPUT-'].update(values['-IN-'])

window.close()


Screenshot, Sketch, or Drawing

Watcha Makin?

If you care to share something about your project, it would be awesome to hear what you're building.
bug

Lenguaje dominante
Python
Estrellas
13.8k
Forks
1.8k
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PySimpleGUI/PySimpleGUI

Todos los issues de PySimpleGUI/PySimpleGUI

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.