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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to