Reading ini file values into a combox-list

Softselect

Member
Licensed User
Hi Mastercoders,
I am wanting to transfer values from a ini file into a combobox-list
I am attaching my attempt
Any better ideas ;)

I am Finaly getting the hang of Basic4PPC, being self schooled on BBC Basic back in the eighties, this event driven concept is new to me.

Thanks for all your help
Friedrich
 

Attachments

specci48

Well-Known Member
Licensed User
Hi Softselect,

I don't know if it's a really better idea, but I would change your code to:
B4X:
...
FileOpen(c2,"ring.ini",cRead)
ring=FileRead(c2)
Do While ring <> EOF        'loop to read till end of file
    sizepick.Add(&ring)       'adds string of ring to list
    ring=FileRead(c2)
    'Msgbox(ring,"value")     'used for debug
Loop 
FileClose(c2)
...
so you don't need to exit the do...loop manually.


specci48
 
Top