[Gambas-user] Enumerate an Array Control
Lord Quo
lord.quo at ...626...
Wed Oct 6 18:31:29 CEST 2010
I think is something like:
Dim $item As ListViewItem
For Each $item in lvwScanDirs
Print $item.Text
Next
-----Mensaje original-----
De: user [mailto:demosthenesk at ...626...]
Enviado el: Miércoles, 06 de Octubre de 2010 11:14 a.m.
Para: Gambas User List
Asunto: [Gambas-user] Enumerate an Array Control
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.
----------------------------------------------------------------------------
--
Beautiful is writing same markup. Internet Explorer 9 supports standards for
HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list