Micheal:
I use listboxes with movers all the time:
To jog your memory and/or creative juices here is a code sample of what I have in the interactive change method to
re-set the order of a table displayed in a grid.
local i, lnHold_player, lnRow, lnSubs
gcReport_cutoff = ""
gcCutoff = ""
gcPrt_order = "LISTED ORDER: "
gcOrder = ""
for i = 1 to 4
lnSubs = ascan(gaOrder, thisform.lstOrder.list(i))
lnRow = asubscript(gaOrder,lnSubs,1)
gcOrder = gcOrder + gaOrder(lnRow,2) &&final order string
gaRpt_order(i,1) = gaOrder(lnRow,5) &&report column head
gaRpt_order(i,2) = gaOrder(lnRow,6) &&report field
if i <> 4 then
gcOrder = gcOrder + ", "
endif
gcPrt_order = gcPrt_order + alltrim(thisform.lstOrder.list(i)) &&scout print
order
if i <> 4 then
gcPrt_order = gcPrt_order + " -- "
endif
endfor
*reorder the grid...
lnHold_player = tFinal.s_id
thisform.grid2.recordsource = ""
do case
case thisform.cmbPos.listindex = 1 &&all positions
select * ;
from tHold ;
order by &gcOrder ;
into table tFinal
otherwise
select * ;
from tHold ;
order by &gcOrder ;
where &gcWhere_pos ;
into table tFinal
endcase
select tFinal
go top
locate for s_id == lnHold_player
thisform.grid2.recordsource = "tFinal"
thisform.grid2.setfocus() &&triggers aftercolchange event in grid2
thisform.refresh()
Regards,
Jack Skelley
MB Software Solutions wrote:
I've got a cursor with a column called iPriority (integer) whereby I
show the user the current set of priorities. I chose the Listbox,
setting it's rowsource to 0-None and populating it with the cursor's
values via SCAN loop in the Listbox.Init event. I set the MoverBars
property to .T. so that the user can easily adjust the priority of
things he wants done. All well and good so far. To get those changes
in priorities back to the database, I suppose I just cycle through the
control and rewrite the iPriority values based upon the new order,
right? I haven't used the MoveBars property before, so I thought I'd
tap someone who has done something like this.
Just reminds me of the so many things I just never got around to using
in VFP! ;-)
tia,
--Michael
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.