Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing order of items in a listbox 2

Status
Not open for further replies.

BlackDice

Programmer
Mar 1, 2004
257
US
I'm trying to create a listbox of the type that allows you to rearrange the order of items in the list. This is on a form that was newly added to the app. there is another form already in the app (made by a previous developer) that has this functionality. I copied the listbox and pasted it on a new form as it was. the only thing I changed was the recordsource. But it doesn't have that rearranging capability and I can't figure out why after comparing the properties, which all seem to be identical. does anybody know what the problem is or have any suggestions?

BlackDice

 
Perhaps the listbox needs its MoverBars property set...

MoverBars = .T.

boyd.gif

 
What's the RowSourceType and RowSource? MoverBars only work if RowSourceType is 0 or 1. That's because those are the only ones where the list "owns" the data.

Tamar
 
I take back what I just said... I noticed that you metioned the recordsource, and I figure you mean the rowsource of the listbox...
VFP Help said:
The MoverBars property is only available if the RowSourceType property is set to 0 (None) or 1 (Value).

You will need to add the items to the listbox through code. There is an example of this in your refmast screen from the maintain.pjx. It's in a method of the refmast form called FILLLIST.

boyd.gif

 
yeah, I saw that was different, so I changed that. but it still doesn't look the same at design time. I just copied and pasted another instance of the listbox and it does look right at design time. I'm going to try to modify that filllist procedure to work with this one. thanks for your help!!

BlackDice

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top