[futurebasic] Re: [FB] Scrolling List (Hilite) PG & FB^3 Rel 5

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2002 : Group Archive : Group : All Groups

From: Bernie Wylde <bernie.w@...>
Date: Wed, 05 Jun 2002 07:57:22 +0100
John Smith wrote:

> I have a PG project using FB^3 release 5 where I am using a scrolling list.
> When I switch from one line to another, I need to update data on the old
> line, redisplay the updated data on the old line then hilite the new line.
> 
> The problem that I am encountering is color flicker-- (1) the new line
> hilites then (2) the old line hilites and updates and (3) we go back to the
> new line and it hilites..
> 
> The question: How do we inhibit the colored hilite  at setp (2) but still
> update the old line in the scroll list  ??
> The code snippet is as follows:
> 
> '----------------------------
> 
> gNew = button(btnID)       ' the new line selection
> :'                                      ' replace the line in the STR# with
> 'theTxt$'
> FN repElement(gCurrentLine, strID, theTxt$, gResRef)
> :                                      ' update the scoll list...only the line
> FN viewListItem(btnID, -gCurrentLine)
> :                                      ' hilite the newly selected line
> FN viewListItem(btnID, -gNew)
> 

John,
You only need the one FN viewListItem after you've made your change(s).
FN repElement does the update(s), you just can't _see_ the change(s) until
you do a FN viewListItem.

So, remove FN viewListItem(btnID, -gCurrentLine) and there's no flicker.

Cheers
Bernie