[REBOL] Re: text-list/text (scroll bar problem)
From: philb:upnaway at: 17-Nov-2001 21:48
This certianly fixes the duplicates problem.
Unfortuntely it still leaves an outstanding bug.
If I have a text list with many entries update the slider to a smaller list the slider
gets fixed and moved to the top of its container but the text list is not refreshed until
you press the slidder.
See the program below.
Drag the slider to the bottom.
Press the update button.
The text-list is updated but nothing is displayed in the text list until you drag the
appently fixed slider downwards :-(
; fix slider when text list is updated
fix-slider: func [faces [object! block!]]
foreach lv-list to-block faces
; print [length? head lv-list/lines lv-list/lc]
lv-list/sld/redrag lv-list/lc / max 1 length? head lv-list/lines
tl-data: [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20]
tl: text-list data tl-data 100x100
button "Update it"
insert tl-data [1 2 3 4]
=== Original Message ===
Phil, et al
<< There is a bug in that if you are in a large directory and and scrolled
to the bottom and select a small directory you get duplicate entries at the
top of the newly displayed directory. >>
I hope RT can give us a definitive solution to this problem. In the
meantime, the most complete solution I've come up with is to do:
before you do the sld/redrag call. In my empirical testing here, it seems to
solve the problem. YMMV.