[Gambas-user] listBox

Fabien Bodard gambas.fr at ...626...
Wed Nov 15 09:45:50 CET 2006


send me your source...

2006/11/13, Henri Girard <girardhenri at ...67...>:
>
> thanks first Laurent :)



where Laurent ?

Regards, Fabien Bodard

sorry for being so newbie...
> the static sub doesn't accept filename and data it suggests otherthings
> and now it says still i give him a string ...
> thanks
> Henri
>
> 'STATIC SUB * Save * ( * FileName * AS String, * Data * AS String)
> PUBLIC SUB ouvrir_Click()
> DIM c AS String
> DIM cadenas AS String[]
> Dialog.Title = "Sélection d'une fiche"
> Dialog.Filter = ["Date agenda (*.data)", "Tous les fichiers (*.*)"]
>
> IF Dialog.OpenFile() THEN
>   cadenas = Split(File.LOAD(Dialog.Path), "\n")
>   ListBox1.Clear()
>   FOR EACH c IN cadenas
>   ListBox1.Add(c)
>   NEXT
>   END IF
> END
>
> PUBLIC SUB sauve_Click()
> DIM lineas AS String[]
> DIM destino AS String
> DIM numArchivo AS Integer
>   lineas = ListBox1.List.Join(",")
>   Dialog.Title = "Sélectionner un fichier"
>   Dialog.Filter = ["Date agenda (*.data)"]
>   IF NOT Dialog.SaveFile() THEN
>     IF Right$(Dialog.Path, 5) <> ".data" THEN
>       destino = Dialog.Path & ".data"
>     ELSE
>       destino = Dialog.Path
>     END IF
>     'PRINT "Guardando en " & destino
>      File.Save(destino, lineas.join("\n"))
>     ' ListBox1.List = Split(file.load(destino), "\n")
>   END IF
> END
>
>
>
>
>
>
>
> >From: "Fabien Bodard" <gambas.fr at ...626...>
> >Reply-To: mailing list for gambas users <
> gambas-user at lists.sourceforge.net>
> >To: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
> >Subject: Re: [Gambas-user] listBox
> >Date: Mon, 13 Nov 2006 08:48:51 +0100
> >
> >File.Save(destino, lineas.join("\n"))
> >
> >Don't forget that lineas is a String[]
> >and :
> >
> >STATIC SUB *Save* ( *FileName* AS String, *Data* AS String )
> >4
> >and for loading you list :
> >
> >Listbox1.list = split(file.load(destino), "\n")
> >
> >Regards,
> >  Fabien Bodard
> >-------------------------------------------------------------------------
> >Using Tomcat but need to do more? Need to support web services, security?
> >Get stuff done quickly with pre-integrated technology to make your job
> >easier
> >Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >_______________________________________________
> >Gambas-user mailing list
> >Gambas-user at lists.sourceforge.net
> >https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> _________________________________________________________________
> Découvrez Windows Live Messenger : le futur de MSN Messenger !
> www.windowslivemessenger.fr
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> 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