PySimpleGUI / PySimpleGUI/PySimpleGUI
[Enhancement] PySimpleGUIQt Browse-type buttons would benefit from having the `size_px` parameter
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 13.8k
- Forks
- 1.8k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Type of Issue (Enhancement, Error, Bug, Question)
The FileBrowse object has no size_px parameter
Operating System
Windows 10 Enterprise version 10.0.19044
PySimpleGUI Port (tkinter, Qt, Wx, Web)
PysimpleGUIQt (Qt Port)
Versions
Python version
Python 3.10.6
PySimpleGUI Version
PySimpleGUIQt v0.35.0
Your Experience In Months or Years (optional)
4 Years Python programming experience
5 Years Programming experience overall
Have used another Python GUI Framework? No
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
- 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 currently writing a program for which I for once must make it look somewhat Professional.
To achieve this, wanted to have uniform Buttons.
I used the "size_px" argument to set the size of my buttons to a fix and reproducible value.
The FileBrowse Object however does not support "size_px", only "size".
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 PySimpleGUIQt as sg
#layout = [[sg.Button("Button", size_px=(100, 100))]]
layout = [[sg.FileBrowse("Browse Devices", file_types=(("Device Configs", "*txt"),), key="BROWSEDEVICEBUTTON", pad=(0, 15), size_px=(100, 100))]]
window = sg.Window("title", layout)
while True:
event, value = window.read()
if event == sg.WIN_CLOSED: break
if you comment out the layout with the FileBrowse and instead use the normal Button, you can compare the two with each other.
Watcha Makin?
Im a Student working in a company between semesters and have been tasked with creating a program to write certain Tables to the EEPROM of the devices we are selling. Since this is my first program to be used via a GUI, i chose PySimpleGUI as it is easy to start with.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne bei der PySimpleGUIQt FileBrowse-Implementierung und vergleiche, wie der reguläre Button den Parameter size_px verarbeitet. Überprüfe das bereitgestellte FileBrowse-Beispiel und betrachte die Arbeit als abgeschlossen, wenn size_px akzeptiert wird und die angeforderten festen Button-Abmessungen erzeugt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- desktop
- Issue-Typ
- Feature
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 52/100