PySimpleGUI / PySimpleGUI/PySimpleGUI

[Bug] controlling the scroller via `set_vscroll_position` does not work for Column elements

Open
#3,320 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Port - TK
Dominant language
Python
Stars
13.8k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Type of Issue (Enhancement, Error, Bug, Question)

Bug


Operating System

windows 10

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.8.1

PySimpleGUI Version (sg.__version__)

4.28.0

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

None


Your Experience In Months or Years (optional)

2 Years Python programming experience

5 Years Programming experience overall

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

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 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
  • Tried using the PySimpleGUI.py file on GitHub. Your problem may have already been fixed but not released
Detailed Description

I'm trying to use the set_vscroll_position() in order to ease the user navigation in a column containing lots of rows full with input boxes but it keeps firing the following warnings and does not work:
Warning setting the vertical scroll (yview_moveto failed)
'TkScrollableFrame' object has no attribute 'yview_moveto'

My Code
This program is creating a window which contains a column that has a pre determined layout containing all the mentioned input boxes and a pre determined sizes.

in addition there are the discussed buttons inside.

Code To Duplicate
form = sg.Window('analysis').Layout([
				[sg.Column(layout, size=(width / 3, height / 2), scrollable=True, key = "Column")], 
				[sg.OK(), sg.Button('Up', key = "up"), sg.Button('Down', key = "down")]
				])


while True:
	event, values = form.read()
	
	if(event == sg.WIN_CLOSED):
		break
	elif(event == "down"):
		form.Element('Column').set_vscroll_position(1.0)
	elif(event == "up"):
		form.Element('Column').set_vscroll_position(0.0)
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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided Column layout and inspect set_vscroll_position together with the TkScrollableFrame warning path. Done means the Up and Down buttons move the scrollable Column to the requested positions without the yview_moveto warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.