> - When first displaying the file, it looks like the scrollbar has "holes" in
>
it. This is a screenshot I made as an example (using white as the scrollbar
> fo
reground and light grey as the scrollbar background):
Not sure. Are you setting
the background colour to LIGHTGRAY or BG_LIGHTGRAY?
Is the ANSI content being loa
ded before or after the scrollbar is opened /
cycled for the first time?
> - I hav
e an input loop in my script that waits for a keypress and scrolls the
> Frame wh
en the user presses the up or down arrow, PageUp, PageDown, Home, or
> End. The
scrollbar refreshes when I scroll up & down one line (using the
> Frame's scroll(
) method), but after using the Frame's scrollTo() method
> (which I'm using for P
ageUp, PageDown, Home, and End), the scrollbar doesn't
> refresh until cycle() is
called a 2nd time (which happens when I press
> PageUp, PageDown, Home, or End i
n my script).
The ScrollBar doesn't actually redraw itself when you call .cycle()
on it; it
just updates its position info. The drawing takes place when .cycle()
is
called on the parent Frame. You could try calling .cycle() on the ScrollBar
a
fter you have called Frame.scrollTo() but prior to calling Frame.cycle().
(That m
ay or may not help, but it's worth a shot.)
> For the 2nd issue, I'm not sure if
it's something I'm doing wrong in my
> script or if it's an issue in the scrollb
ar/frame class.
Probably just differences in the way you're using it and the way
I expected to
use it. In my input loops, I usually use console.inkey rather than
c
onsole.getkey, and call [whatever].cycle() each time through the loop. This
way,
stuff gets updated as needed whether the user has pressed a key or not.
(Useful
if you want to update stuff in the terminal while the user is idling,
etc.)
---
ech
icken
electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
---
■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
|