Visual Fox Pro - List Method

I am new to Visual Fox Pro (VFP) and it's hard to find what I need documentation wise.

I am trying to understand what this means:

lcServiceWhere = ThisForm.cboNoteType.List[ThisForm.cboNoteType.ListIndex,3]

Is this taking the 3rd value (so index = 2) in a list?

Upvotes: 0

Views: 772

Answers (2)

Cetin Basoz
Cetin Basoz

Reputation: 23797

ListIndex denote the selected item's index and 3 is the column number. This type of retrieval always returns the data as string regardless of the underlying datatype.

Upvotes: 0

Herb
Herb

Reputation: 650

A lot of Foxpro code uses Hungarian notation for naming variables.

Based on common naming standards, cboNoteType is mostly likely a Combobox control. The List property is an array of the contents of the combobox. The ListIndex is the currently selected row. The 3 represents the 3rd column in that array.

So the lcServiceWhere variable is being assigned the value in 3rd column of the currently the selected row of (the array that's holding) the contents of the cboNoteType Combobox.

Upvotes: 4

Related Questions