> Il giovedì 30 aprile 2009 19:46:25 Joshua Higgins ha scritto:
>   
>> Hi all,
>>
>> Is it possible to read a file and load it line by line into a listview, but
>> backwards? I have been using the example from gambasdoc for loading files
>> line by line, but I'm writing a logging page and want to show newest items
>> first.
>>     

    PUBLIC SUB Form_Open()
      DIM f AS File
      DIM s AS String
      DIM n AS Integer

      ListView1.Add(0, "")
     
      f = OPEN "FMain.class" FOR INPUT
      WHILE NOT Eof(f)
        LINE INPUT #f, s
        INC n
        ListView1.Add(n, s, NULL, 0)
      WEND
      CLOSE f
    END


Regards,

-- 
Doriano Blengino

"Listen twice before you speak.
This is why we have two ears, but only one mouth."


------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to