[futurebasic] Re: [FB] TWM and Lists

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2007 : Group Archive : Group : All Groups

From: Robert Purves <listrp@...>
Date: Wed, 7 Mar 2007 22:24:34 +1300
Dennis J. Fast wrote:

> I used TWM to create a list, used the functions in the ListBox.INCL  
> in the
> project file that TWM generated.
>
> I do not see how to update what the list displays. I send info to  
> list, but
> list is not visually updated until I click on it.
>
> I can add and delete rows, but no update of what is on screen until  
> a click
> in list. Delete also does not clear the row visually at all.

> local fn AddPlate (  Plate as str255, Code as str255 )
> 	myNumRows++
> 	fn ListAddRow(  _ListPlates, myNumRows, 1 )
> 	fn ListSetCell( _ListPlates, myNumRows, 1, Plate )
> 	fn ListSetCell( _ListPlates, myNumRows, 2, Code )
> 	fn ListSelectOne(_ListPlates, myNumRows, 1)
> end fn
> -------------------
> local fn DeletePlate
> 	myCell = fn ListGetSelect(_ListPlates)
> 	myRow = myCell.v%
> 	myNumRows--
> 	fn ListDeleteRow(_ListPlates, myRow, 1)
> end fn



Add this as the last line of your functions:
DrawOneControl( button&( _ListPlates ) )

Robert P.