Description
Type of Issue (Enhancement, Error, Bug, Question)
Bug
Operating System
Android 14 - PyDroid3
PySimpleGUI Port (tkinter, Qt, Wx, Web)
tkinter
Versions (NOTE - PSG4 is no longer supported)
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.11.4
PySimpleGUI Version (sg.__version__
)
5.0.6
GUI Version (tkinter (sg.tclversion_detailed
), PySide2, WxPython, Remi)
tkinter 8.6.10
GUI Version (tkinter (sg.tclversion_detailed
), PySide2, WxPython, Remi)
Priority Support Code (Commercial License Users)
Your Experience In Months or Years (optional)
1 year
Years Python programming experience
1 year
Years Programming experience overall
50 years
Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)
tkinter (briefly)
Anything else you think would be helpful?
Troubleshooting
These items may solve your problem. Please check those you've done by changing - [ ] to - [X]
- [ x] Searched main docs for your problem PySimpleGUI Documenation
- Looked for Demo Programs that are similar to your goal. It is recommend you use the Demo Browser! Demo Programs
- [x ] 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)
- [x ] Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.com
- Have upgraded to the latest release of PySimpleGUI on PyPI (lastest official version)
- Tried running the Development Build. Your problem may have already been fixed but not released. Check Home Window for release notes and upgrading capability
- For licensing questions please email [email protected]
Detailed Description
This is a low priority, aesthetic, issue restricted to PySimpleGUI in PyDroid3. It is mainly 'for your information'. I enjoy using PyDroid3 to write 'hobby' programs on my phone, and after struggling with tkinter GUIs, I was very happy to discover PySimpleGUI and how well it works overall in PyDroid3.
Having Popups (and custom Window popups) always show a titlebar and frame looks a little messy on the small phone screen. At least they are functional, and a maximized Window does lose its titlebar and frame.
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
HDG = """
================================================
TitlebarsOnAndroid.py v.2024-09-20b
'''''''''''''''''''''
When running a PySimpleGUI script on Android
with PyDroid3, the 'no_titlebar' parameter for
Windows and Popups is ignored. Only maximized
Windows will not have a titlebar/frame.
NB: This Window has 'no_titlebar=True'.
================================================
"""
sg.theme('DarkGray16')
ISMAX=False
FNTL=(None,9)
FNTS=(None,5)
MONS=('Droid Sans Mono',5)
def ui():
rowT = [
sg.Text(" Titlebars On Android",
pad=0, font=FNTL,
background_color='#4a5459',
expand_x=True),
sg.Text(" x ", key="-CLOSE-",
pad=0, font=FNTL,
enable_events=True,
background_color='Maroon')
]
rowD = [sg.Text(HDG, font=MONS, expand_x=True)]
rowB = [
sg.Button("Toggle Max", key='-MAX-',
font=FNTS, expand_x=True),
sg.Button('Popups', key='-POPUPS-',
font=FNTS, expand_x=True)
]
layout = [rowT, rowD, rowB]
window = sg.Window("Titlebars On Android",
layout,
size=(1000, 650),
location=(15,20),
grab_anywhere=True,
no_titlebar=True,
resizable=True,
finalize=True)
return window
# ==============================================
if __name__ == '__main__':
print(HDG)
win = ui()
while True:
ev, val = win.read()
if ev in (sg.WIN_CLOSED, '-CLOSE-'):
break
if ev == '-MAX-':
if ISMAX:
win.normal()
win.refresh()
win.move(15,20)
else:
win.maximize()
ISMAX=not ISMAX
if ev == '-POPUPS-':
sg.popup("no_titlebar = False",
title="Popup",
font=(None,6),
non_blocking=True,
location=(100,800),
no_titlebar=False)
sg.popup("no_titlebar = True",
title="Popup",
font=(None,6),
non_blocking=True,
location=(600,800),
no_titlebar=True)
# loop
win.close()
print("\nDone.\n")
# ==============================================
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.