[Gambas-user] Enumerate an Array Control
user
demosthenesk at ...626...
Wed Oct 6 18:13:40 CEST 2010
Hi,
i have this SUB
-------------------
PUBLIC SUB MakePathList()
DIM iInt AS Integer
DIM sKey AS String
' FOR EACH sKey IN lvwScanDirs
' PRINT lvwScanDirs[sKey].Text
' NEXT
lvwScanDirs.MoveFirst
FOR iInt = 0 TO lvwScanDirs.Count - 1
PRINT lvwScanDirs[lvwScanDirs.Item.key].Text
lvwScanDirs.MoveNext
NEXT
END
-------------------
All i want to achieve is to enumerate a listviewcontrol.
i managed it with the code above.
Is there any easier way to do this with FOR EACH? For example like that.
DIM sKey AS String
FOR EACH sKey IN lvwScanDirs
PRINT lvwScanDirs[sKey].Text
NEXT
this code is wrong and i dont know how to enumerate with FOR EACH a
control.
More information about the User
mailing list