**************************************************************** * This is the code where I'm using IndexToItemID *-- LW 3/30/2004 - added lnRow to correctly remove * items whose position had been changed * by MoverBar in the selected array LOCAL lcArray, lnRow LOCAL laArray[1] lcArray = oSource.RowSource =ACOPY(&lcArray,laArray) FOR lnCounter = 1 TO oSource.ListCount IF oSource.Selected(lnCounter) AND !oSource.Isdimmed(lnCounter) *Get the ItemID for the selected entry from the RowSouce array. If it has been moved in the selected list, *the row in the list will not be the same and the wrong row will be duplicated by the DupeRow method below. *Get the current row number for that ItemID. IF oSource.MoverBars *What is the ItemID of the selected item? lnItemID = oSource.IndexToItemID(lnCounter) *find the Item ID in the original array (column 2 stores the Item ID) * and return the row number where it originally appeared lnRow = ASCAN(&lcArray, lnItemID,1,-1,2,8) ELSE *if there are no mover bars, the Index will be equal to the actual position lnRow = lnCounter ENDIF * change subsequent reference from lnCounter in the original framework to lnRow oSource.DupeRow(@laSource, lnRow) THIS.AddItemToRowSourceArray(@laSource, .T.) IF THIS.RowSourceType = 0 THIS.AddListItem(laSource[1,1], laSource[1, 2]) ENDIF * change subsequent reference from lnCounter in the original framework to lnRow oSource.MarkRow(lnRow) ENDIF ENDFORI'm going to stick with my original fix since it seems to do the same job with fewer steps, but stash this alternative somewhere in case problems turn up with the first solution. Meanwhite, this technique may help solve a problem someone else is having.