I'm trying to create a scrollable list (array of strings) set in a window. I have four variables that are used to determine the placement of the viewable elements of the list in a window. These are:
lw.list.curr // current list element
lw.list.count // total number of elements in list
lw.top // first visible element in window
lw.bot // last visible element in window
lw.list.curr is the variable that controls the scrolling, so that it must be incremented or decremented before the following function is called to handle the windowed list.
i.e.:
lw.list.curr++;
lw = show_list(lw);
or ...
lw.list.curr--;
lw = show_list(lw);
Below is what I've got so far for the function show_list(). I can't figure out what's wrong, and I've tried all sorts of things but I always get a one-off error or a corrupted list view. 2 and a half days of struggling with this and I'm ready to rip my hair out. Please help!