[REBOL] Re: text-list/text (scroll bar problem)
From: philb:upnaway at: 18-Nov-2001 17:35
see Romano's earlier answer .... it works for me.
Thanks for asking the original question .... it has fixed a long standing but in one
of my programs.
My example program now works ....
; 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/sn: 0 ; this is the Romano's change
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 ===
From: "Gregg Irwin" <[greggirwin--mindspring--com]>
> 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:
> sld/data: 0
> before you do the sld/redrag call. In my empirical testing here, it seems to
> solve the problem. YMMV.
It works partially. The bar now covers the whole vertical space available, that
is good, but then I still need to _try_ to drag the slider to update the list
of items. Otherwise the list shows no items, it appears empty.