PySimpleGUI / PySimpleGUI/PySimpleGUI

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

Đang mở
#3,320 7 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Bug Port - TK
Ngôn ngữ chính
Python
Star
13.8k
Fork
1.8k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện vấn đề với bố cục Column được cung cấp và kiểm tra set_vscroll_position cùng với đường dẫn cảnh báo của TkScrollableFrame. Công việc được xem là hoàn tất khi các nút lên và xuống di chuyển Column có thể cuộn đến các vị trí được yêu cầu mà không có cảnh báo yview_moveto.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
desktop
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.