[Gambas-user] PictureBox not refresh copied image.

Demosthenes Koptsis demosthenesk at ...626...
Tue Jan 26 10:45:45 CET 2010


yes Picture.Load works without need of Picture.Refresh.

Thanks both of u.

2010/1/26 Benoît Minisini <gambas at ...1...>

> > Demosthene,
> >
> > The way I got my picturebox to work is this
> >
> > PictureBox1.Picture =
> > Picture.Load("/usr/share/pixmaps/wicd/wicd-client.png")
> >
> > so if you could try changing your code to this:
> >
> > ...
>
> Yes, Picture[...] actually loads the picture into an internal cache that is
> never automatically refreshed.
>
> You can refresh the cache by assigning Picture[] with Picture.Load, this
> way:
>
>  PictureBox1.Picture = Picture[s1] 'load Algiz.png
>  Message("pic1")
>  KILL s1 'delete Algiz.png
>  COPY s2 TO s1 'copy Raido.png and rename it to Algiz.png
>   'PictureBox1.Refresh <-- normally useless, unless there is a bug
>  Picture[s1] = Picture.Load(s1) ' Refresh the cache entry
>  PictureBox1.Picture = Picture[s1]
>
> Regards,
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 

Γεια χαρα σε όλους!!!

Regards,

Demosthenes Koptsis



More information about the User mailing list