Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multi-Column Listbox via AddItem/AddListItem
Message
De
01/12/1999 11:03:22
 
 
À
01/12/1999 10:45:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00297316
Message ID:
00297325
Vues:
12
Hi Jeff:

Make the list RowSourceType = 1 - Value and RowSource = None. In my forms, I generally have a ViewsRequery method that is fired from Form Init and whenever something is changed. In that method I have the following code. BTW, vueprocsteps is a view with the structure stepno N(3,0), stepdesc C(30), statduring C(20), statcompleted C(20), pk C(46))
ThisForm.conMain.lstPTSteps.Clear
SELECT vueprocsteps
LOCA
nItem=1
SCAN
   ThisForm.conMain.lstPTSteps.AddListItem(TRANS(vueprocsteps.stepno,"9999"),nItem,1)
   ThisForm.conMain.lstPTSteps.AddListItem(vueprocsteps.stepdesc,nItem,2)
   ThisForm.conMain.lstPTSteps.AddListItem(vueprocsteps.statduring,nItem,3)
   ThisForm.conMain.lstPTSteps.AddListItem(vueprocsteps.statcompleted,nItem,4)
   ThisForm.conMain.lstPTSteps.AddListItem(vueprocsteps.pk,nItem,5)
   nItem=nItem+1
ENDSCAN
>I have an array of 4 columns built out of a SELECT, and I'm trying to use it to populate a 4-column listbox on a form. The thing is, I need to allow the users to reorder the entries with MoverBars, which means the data source must be None, and the elements added with AddItem or AddList item.
>
>The problem is, I can't seem to get the array elements to all add in the same row. My problem seems to hinge around what values to enter for nIndex (AddItem) or nItemID (AddListItem), which I *have* to pass because I need to pass nColumn after it.
>
>Does anyone have a code snippet for populating multi-column listboxes via AddItem/AddListItem?
>
>thanks in advance.
>
>-- jas
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform