Hi Rudy,
Here is some code to get you started. It uses a table with a single indexed
boolean field to quickly generate any size selection you need to manage
scrolling. I used this technique with list boxes before it was possible to use
collections to manage scrolling.
C_LONGINT($1;$count)
C_LONGINT($new)
$count:=$1
$new:=Records in table([LB_Selection])-$count
If ($new<0)
$new:=Abs($new)
ARRAY BOOLEAN($aIndex;$new)
If (Records in selection([LB_Selection])>0)
REDUCE SELECTION([LB_Selection];0)
End if
ARRAY TO SELECTION($aIndex;[LB_Selection]Index)
End if
SCAN INDEX([LB_Selection]Index;$count;>)
GOTO SELECTED RECORD([LB_Selection];1)
> On Dec 10, 2019, at 7:44 AM, Two Way Communications via 4D_Tech
> <[email protected]> wrote:
>
>
> Hi John,
>
> That is a very clever solution!
>
> Thanks, I wouldn’t have thought of that!
>
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************