Difference between revisions of "ListBox.Rows"

From Xojo Documentation

(Examples)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
{{SupportedPlatforms | type=d}}
 
{{MethodBox
 
{{MethodBox
 
| name=Rows
 
| name=Rows
Line 4: Line 5:
 
| ownertype=class
 
| ownertype=class
 
| scope=public
 
| scope=public
| type=Desktop
 
 
| returntype=[[ListBoxRow]]
 
| returntype=[[ListBoxRow]]
 
| newinversion=2019r3
 
| newinversion=2019r3
Line 14: Line 14:
 
In this example, the Tag of each row is examined and if it's found to be "Taxable", the ComputeTaxes method is called and passed the value of the row.
 
In this example, the Tag of each row is examined and if it's found to be "Taxable", the ComputeTaxes method is called and passed the value of the row.
 
<rbcode>
 
<rbcode>
For Each row As ListBox.Rows In ListBox1
+
For Each row As ListBoxRow In ListBox1.Rows
   If row.Tag = "Taxable" then ComputeTaxes(row.Value)
+
   If row.Tag = "Taxable" then ComputeTaxes(row.ColumnValueAt(0))
 
Next
 
Next
 
</rbcode>
 
</rbcode>
  
 
[[Category:API 2.0]]
 
[[Category:API 2.0]]

Latest revision as of 14:21, 10 December 2019


Method

ListBox.Rows() As ListBoxRow

New in 2019r3

Supported for all project types and targets.

Allows you to iterate through all the rows in a ListBox.

Examples

In this example, the Tag of each row is examined and if it's found to be "Taxable", the ComputeTaxes method is called and passed the value of the row.

For Each row As ListBoxRow In ListBox1.Rows
If row.Tag = "Taxable" then ComputeTaxes(row.ColumnValueAt(0))
Next