[Gambas-user] Picture Viewer Project

Michael Sullivan michael at ...558...
Mon Mar 14 22:24:53 CET 2005


That worked great!  Now one more thing:  Is there a way to make
scrollbars appear on my PictureBox if the image being displayed is too
large for the PictureBox?

On Mon, 2005-03-14 at 21:31 +0100, Bodard Fabien wrote:
> Le lundi 14 Mars 2005 21:19, Michael Sullivan a écrit :
> > I've gotten past the Null Object error.  Here is my code:
> >
> > PUBLIC SUB fileList_Select()
> >   DIM hPic AS Picture
> >   DIM tempPic AS String
> >
> >   tempPic = myDir & "/" & Str(fileList.Current)
> >   hPic = NEW Picture
> >   hPic.Load(tempPic)
> >
> >   MyPicture.Picture = hPic
> >
> > END
> >
> > But whenever I pick any picture filename I get the error "Unable to load
> > picture".  The documentation says that the PictureBox control can load
> > jpegs.  The picture I tried it on was a jpg.  Does that make a
> > difference?  What am I doing wrong?
> 
> 
> PUBLIC SUB fileList_Select()
> 
>    MyPicture.Picture = Picture[mydir &/ filelist.current.text]
> 
>  END
> 
> That's  all :)
> 
> in fact filelist.current return an object (.listitem) not text.
> 
> 
> Fabien Bodard
> 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id396&opÌk
> _______________________________________________
> 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