-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Type of Issue (Enhancement, Error, Bug, Question)
This is a bug
Operating System
PySimpleGUI Port (tkinter, Qt, Wx, Web)
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.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
PySimpleGUI Version (sg.__version__)
4.60.4 Released 10-Oct-2022
GUI Version (tkinter (sg.tclversion_detailed), PySide2, WxPython, Remi)
8.6.12
Troubleshooting
These items may solve your problem. Please check those you've done by changing - [ ] to - [X]
- [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)
- [x ] 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.org
- [x ] Have upgraded to the latest release of PySimpleGUI on PyPI (lastest official version)
- [x ] Tried using the PySimpleGUI.py file on GitHub. Your problem may have already been fixed but not released
Detailed Description
Without expanding X on any:
tab2_layout = [
[sg.Text("Current chat: None", key="-current_chat-")],
[sg.Text("Chats:")],
[sg.Table(values=[], headings=["Name:", "Last Message:", "Timestamp:"], key="-table_chats-", enable_events=True, expand_y=True), sg.Listbox(values=("1", "2", "3"), select_mode=sg.LISTBOX_SELECT_MODE_SINGLE, expand_y=True, key="-listbox_chats-")],
]When I add expand_x=True to only the second element (Listbox), they both shift, which is not what I think is intended?:

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:
tab2_layout = [
[sg.Text("Current chat: None", key="-current_chat-")],
[sg.Text("Chats:")],
[sg.Table(values=[], headings=["Name:", "Last Message:", "Timestamp:"], key="-table_chats-", enable_events=True, expand_y=True), sg.Listbox(values=("1", "2", "3"), select_mode=sg.LISTBOX_SELECT_MODE_SINGLE, expand_y=True, expand_x=True, key="-listbox_chats-")],
]Sorry if I'm just using it wrong, but from what I've seen it looks like it should work?

