Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting MoverBars Moving
Message
From
11/09/2001 05:34:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00554731
Message ID:
00555023
Views:
21
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
>
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform