Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00177457
Message ID:
00177888
Views:
46
Jim,

>Addlistitem takes three arguments, the value to add, the itemid, and the column.

Yup, I had 3 args in the AddListItem() calls and 2 args in the AddItem(). I think Steve Sawyer's PTF-Form Designer book used the combination of the two methods. In loop form it might look clearer.
with thisform.list2
   for liRow = 1 to 5
      lcText = "Row" + padr( liRow, 2 ) + "Col 1"
      .AddItem( lcText, liRow )
      for liCol = 2 to 3
         lcText = "Row" + padr( liRow, 2 ) + "Col" + padr( liCol, 2 )
         .AddListItem( lcText, liRow, liCol )
      endfor
   endfor
endwith
I guess this is just another case where there's a dozen different ways to do anything in VFP.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform