Page 1 of 1

PostPosted: Tue Mar 20, 2007 1:10 pm
by sangahm
The help file and sample files show scrollbars associated with fields; I'd like to know if they can also be associated with StringLists too.

It seems that it works except for the update function. Whenever I try something like:

lstViewGrid.scroll(-10); //lstViewGrid is a StringList object
sclList.update(lstViewGrid); //gives a casting error

I am trying to use the update for responding to hardkey events like:

switch (event.key) {
case evUp:
//sclList.update(lstViewGrid); //doesn't work!!

Does the update only accept a UIField as an operator, or am I doing something else wrong?

PostPosted: Tue Mar 20, 2007 6:24 pm
by Woofin
I don't know for sure, Sangahm, but the help text says the Update method will only take a UIField type argument; i.e.:

void update(UIField field)

So I think the answer is as you suspected, it won't work with StringLists.

PostPosted: Wed Mar 21, 2007 7:32 pm
by sangahm
Just to close the loop on this one, I ended up working around the lack of update with the following code to respond to hardware button events:

switch (event.key) {
case evUp:
sclList.value = sclList.value-10; //page up on up key
FillList(sclList.value); //function that fills in & aligns the data
case evDown:
sclList.value = sclList.value+10; //page down on down key