[Gambas-user] EVENT Transparency?

timothy timothy.marshal-nichols at ...247...
Wed Mar 21 09:35:17 CET 2007


> -----Original Message-----
> From: gambas-user-bounces at lists.sourceforge.net [mailto:gambas-user-
> bounces at lists.sourceforge.net] On Behalf Of Steven Lobbezoo
> Sent: Tuesday, 20 March 2007 10:08 PM
> To: mailing list for gambas users
> Subject: Re: [Gambas-user] EVENT Transparency?
> 
> Hi,
> 
> I'm STILL messing around with blobs and images.
> It's working allright, but ....
> I think it's rediculous that i have to do it like this :
> 
> 1. Read BLOB from MYSQL
> 2. Write it as a STRING to a file
> 3. Make a new picture
> 4. Read the file into this picture
> 5. Transfer the picture into a picturebox.
> 
> or
> 
> 1. Read a fileinto a string
> 2. Write the string into a blob field
> 
> TO read blobs, why cannot I just read the blobdata into the string,
and
> then
> move it somehow directly into the picture control ???
> Whats more : I want to have thumbnails in a column of a grid control.
> Do I have to generate a picture on top of the line/column pair with
the
> thumb
> in it, or is there a way to write either the picturecontrol, or the
> picture
> directly into the cells.
> 
> 
> Any ideas on this ?
> Steven
> 
> 


This example shows how you can use a GridView to show thumbs of an image
and then display the selected image in a PictureBox.

In fact placing pictures in a cell is simple:

	GridView[r, c].Picture = Picture["path/image.png"]

The only real niggle is that this tends to reset the height of all rows.
So you need a line like after adding the picture:

	GridView.Rows.Height = myRowHeight 

This example gets its images from file - so someone else will have to
answer the database bit. But there is a function in the code which can
be used to create the thumbs.

Note that this example uses Gambas 1.9.47 with Benoit's updated
GridView. You may have to change a few things if you use an older
version of Gambas.

EVENT Transparency? It's not required.

Thanks

8-{)} Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ImageViewer-0.0.1.tar.gz
Type: application/x-gzip
Size: 89258 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20070321/00e583fb/attachment.bin>


More information about the User mailing list