You mean user is allowed to move just once ? If so you could note itemids in an array (if not same as listindexes) and as soon as you catch one not matching array value you could set moverbars to .f. (probably would require this.visible = this.visible). (ItemIdToIndex, IndexToItemID).
Cetin
>I am allowing the user to move the selected list item up or down. I wanted
>to control it to only one move.
>
>So what I came up with is Up/Down buttons and the following procedure. The
>nDirection is 1 or -1:
>
>
>PROCEDURE SwapArrayRows
>LPARAMETERS aArray, nRow, nDirection
>
> LOCAL aTemp[7]
>
> WITH This
>
>
> ** Copy the array row to be replaced to the temp array
> FOR nCol = 1 TO 7
> aTemp[nCol] = aArray[nRow + nDirection, nCol]
> ENDFOR
>
>
> ** Replace the target array row with the current array row
> FOR nCol = 1 TO 7
> aArray[nRow + nDirection , nCol] = aArray[nRow, nCol]
> ENDFOR
>
>
> ** Copy the temp array row to the old array row
> FOR nCol = 1 TO 7
> aArray[nRow, nCol] = aTemp[nCol]
> ENDFOR
>
> ENDWITH
>
>RETURN
>