Use of Picture in Grid  
Author Message
JR





PostPosted: Wed Jul 20 10:25:42 CDT 2005 Top

Exchange Servers >> Use of Picture in Grid

Hi there,

I want to show multiple pictures on one form using grid control.
Below example will make you clear about my requirement.
Example:
----------
Table : Books && Contains Books Record
Attributes:
BookName Char(50)
Category Char(10)
PicturePath Char(100) && This field contains path of picture file

I want to show above mentioned table in a Grid along with respective book's
picture. For which i have already saved path of each book's picture.
Let me tell you what i have done in this regard. If any one could correct me
where i get wrong or any new suggestion will be appreciated.
I have used grid and container control. First i have placed all necessary
fields in container along with image box which shows picture available with
"PicturePath".
I have set image control's picture property to =Books.PicturePath
Then i have placed that container in grid control so that i can see multiple
records on one screen. The problem is that Image control shows only one
picture for all records which is set for the first time.
I hope you would have understood my problem. I will be very thankful for any
help in current method or any new suggestion to do the same work.

Regards,
NR

Exchange Server28  
 
 
Jack





PostPosted: Wed Jul 20 10:25:42 CDT 2005 Top

Exchange Servers >> Use of Picture in Grid On Wed, 20 Jul 2005 01:43:55 -0700, "NR"


>Hi there,
>
>I want to show multiple pictures on one form using grid control.
>Below example will make you clear about my requirement.
>Example:
>----------
>Table : Books && Contains Books Record
>Attributes:
>BookName Char(50)
>Category Char(10)
>PicturePath Char(100) && This field contains path of picture file
>
>I want to show above mentioned table in a Grid along with respective book's
>picture. For which i have already saved path of each book's picture.
>Let me tell you what i have done in this regard. If any one could correct me
>where i get wrong or any new suggestion will be appreciated.
>I have used grid and container control. First i have placed all necessary
>fields in container along with image box which shows picture available with
>"PicturePath".
>I have set image control's picture property to =Books.PicturePath
>Then i have placed that container in grid control so that i can see multiple
>records on one screen. The problem is that Image control shows only one
>picture for all records which is set for the first time.
>I hope you would have understood my problem. I will be very thankful for any
>help in current method or any new suggestion to do the same work.

I have not tried this with the Image control, but have used it
successfully with other objects.

In the column that contains the container, set one of the Dynamicxxx
properties that you are not using, for instance:

Thisform.Grid.Column2.DynamicFontBold = "Thisform.SetImage()"

Create a form method SetImage:

WITH Thisform.Grid.Column2
.Cntnr.Image.Picture = PicturePath
* Set any other controls in the container here
ENDWITH

RETURN .F.

 
 
NR





PostPosted: Sat Jul 23 00:02:02 CDT 2005 Top

Exchange Servers >> Use of Picture in Grid



> On Wed, 20 Jul 2005 01:43:55 -0700, "NR"

>
> >Hi there,
> >
> >I want to show multiple pictures on one form using grid control.
> >Below example will make you clear about my requirement.
> >Example:
> >----------
> >Table : Books && Contains Books Record
> >Attributes:
> >BookName Char(50)
> >Category Char(10)
> >PicturePath Char(100) && This field contains path of picture file
> >
> >I want to show above mentioned table in a Grid along with respective book's
> >picture. For which i have already saved path of each book's picture.
> >Let me tell you what i have done in this regard. If any one could correct me
> >where i get wrong or any new suggestion will be appreciated.
> >I have used grid and container control. First i have placed all necessary
> >fields in container along with image box which shows picture available with
> >"PicturePath".
> >I have set image control's picture property to =Books.PicturePath
> >Then i have placed that container in grid control so that i can see multiple
> >records on one screen. The problem is that Image control shows only one
> >picture for all records which is set for the first time.
> >I hope you would have understood my problem. I will be very thankful for any
> >help in current method or any new suggestion to do the same work.
>
> I have not tried this with the Image control, but have used it
> successfully with other objects.
>
> In the column that contains the container, set one of the Dynamicxxx
> properties that you are not using, for instance:
>
> Thisform.Grid.Column2.DynamicFontBold = "Thisform.SetImage()"
>
> Create a form method SetImage:
>
> WITH Thisform.Grid.Column2
> .Cntnr.Image.Picture = PicturePath
> * Set any other controls in the container here
> ENDWITH
>
> RETURN .F.
>
>

Thanks Mr. Jack Jakson!
It worked for me with image box too.

Regards,
NR