problem with text-list slider (even with fix-slider)
[1/1] from: dajoy::operamail::com at: 15-Nov-2001 22:42
I am programming File Selector and Directory Navigator
everything works fine except that when I go to a directory
with very few files compared with the current directory
the slider does not work properly.
Here is the code. Can someone please help me.
Daniel
REBOL [Title: "File Selector and Directory Navigator"]
curr-dir: change-dir %.
lv-data: join [%../] sort read %.
fix-slider: func [faces [object! block!]] [
foreach list to-block faces [
list/sld/redrag list/lc / max 1 length? head list/lines
]
]
view layout
[
vh2 "Current Dir"
curr: vtext to-string curr-dir 200x24
vh2 "File List:"
fileList: text-list data lv-data
[
either dir? value [
either %../ == value [
remove back tail curr-dir
clear next find/last curr-dir "/"
] [
curr-dir: join curr-dir value
]
curr/text: to-string curr-dir
change-dir value
show curr
fileLocal/text: ""
show fileLocal
fileList/lines: join [%../] sort read %.
fix-slider fileList
show fileList
] [
fileLocal/text: value
show fileLocal
]
]
fileLocal: field
]