[issue46803] Item not shown when using mouse wheel to scroll for Listbox/Combobox

2022-02-20 Thread Steven D'Aprano


Change by Steven D'Aprano :


Removed file: https://bugs.python.org/file50635/6.jpeg

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46803] Item not shown when using mouse wheel to scroll for Listbox/Combobox

2022-02-20 Thread Steven D'Aprano


Change by Steven D'Aprano :


--
nosy:  -xiaox55066

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46803] Item not shown when using mouse wheel to scroll for Listbox/Combobox

2022-02-20 Thread Steven D'Aprano


Change by Steven D'Aprano :


--
Removed message: https://bugs.python.org/msg413568

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46803] Item not shown when using mouse wheel to scroll for Listbox/Combobox

2022-02-20 Thread Steven D'Aprano


Change by Steven D'Aprano :


--
Removed message: https://bugs.python.org/msg413567

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46803] Item not shown when using mouse wheel to scroll for Listbox/Combobox

2022-02-20 Thread Steven D'Aprano


Change by Steven D'Aprano :


--
Removed message: https://bugs.python.org/msg413566

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46803] Item not shown when using mouse wheel to scroll for Listbox/Combobox

2022-02-20 Thread 肖小小

肖小小  added the comment:

http://www.strong19.com/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46803] Item not shown when using mouse wheel to scroll for Listbox/Combobox

2022-02-20 Thread 肖小小

肖小小  added the comment:

http://www.strong19.com/category.php?id=5; target="_blank">男性外用持久液  


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46803] Item not shown when using mouse wheel to scroll for Listbox/Combobox

2022-02-20 Thread 肖小小

肖小小  added the comment:

http://www.strong19.com/goods.php?id=56; target="_blank">美國黑神  

--
nosy: +xiaox55066
Added file: https://bugs.python.org/file50635/6.jpeg

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46803] Item not shown when using mouse wheel to scroll for Listbox/Combobox

2022-02-19 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Replicated on Linux, Python 3.10.

It looks like mousewheel scrolling jumps by the wrong amount as it pages down 
(or up), and consequently some lines never appear in the view area.

I ran a slightly modified version of the code that had 16 entries instead of 
just seven. By default, just three entries are visible at a time. If we number 
the lines 1-16, and start with lines 1-3 visible, then we get:

* Initial view: lines 1, 2, 3 visible, 4-16 below the view area.
* Scrollwheel down.
* Lines 6-8 visible, 1-5 above the view area, 9-16 below.
* Scrollwheel down.
* Lines 11-13 visible, 1-10 above the view area, 14-16 below.
* Scrollwheel down.
* Lines 14-16 visible, 1-13 above the view area.

So the scrollwheel scrolls down by: 5 lines, 5 lines, 3 lines.

Going back the otherway, the scrollwheel scrolls up by 5, 5, 3.

Why five lines? My guess is that it might have something to do with 16//3 = 5.

I don't know if this is something we can fix, or we're stuck with whatever 
tk/tcl does.

I don't know if this is related, or should be a separate issue, but I see that 
the keyboard PageUp and PageDown keys don't scroll up or down by a page, but by 
a single line -- and they don't correctly highlight the selected line either.

Paging should scroll up or down by N-1 lines, where N is the number of visible 
lines in the view area.

Likewise for clicking in the scrollbar's PageUp/PageDown region, which also 
scrolls by a single line.

--
nosy: +steven.daprano

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46803] Item not shown when using mouse wheel to scroll for Listbox/Combobox

2022-02-19 Thread Jason Yang


New submission from Jason Yang :

When scrolled items by mouse wheel in tk.Listbox/ttk.Combobox, some items not 
shown.

Is it a bug ? or I did something wrong ?

In following case, 'Wednesday' will not shown when scroll mouse wheel at

- tk.Listbox or vertical scrollbar of tk.Listbox, or
- listbox of ttk.Combo

```python
from tkinter import *
from tkinter import ttk

font = ('Courier New', 24)
lst = ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 
'Saturday')

root = Tk()

frame1 = Frame(root)
frame1.pack(side=LEFT)
vsb1 = Scrollbar(frame1, orient='v')
vsb1.pack(side=RIGHT, fill='y')
var = StringVar()
var.set(lst)
listbox = Listbox(frame1, width=10, height=3, listvariable=var, font=font, 
yscrollcommand=vsb1.set)
listbox.pack(side=LEFT)
vsb1.configure(command=listbox.yview)

frame2 = Frame(root)
frame2.pack(side=LEFT, fill='y')
combobox = ttk.Combobox(frame2, values=lst, width=10, height=3, font=font)
combobox.pack()

root.mainloop()
```

Platform: WIN10

--
components: Tkinter
files: PeS9r.png
messages: 413564
nosy: Jason990420
priority: normal
severity: normal
status: open
title: Item not shown when using mouse wheel to scroll for Listbox/Combobox
type: behavior
versions: Python 3.8, Python 3.9
Added file: https://bugs.python.org/file50634/PeS9r.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com