rpp


Is there a way within the Form Designer to remove the column.textbox control from a GRID and replace it with an image control

I am trying to show an image in each record within in a grid can this be done

Thanks in advance to any help.




Re: Grid modification within the Form Designer

Naomi Nosonovsky


Select grid's textbox in the property sheet. Click on form's titlebar and press delete key. This would remove the textbox control from the column. To add an image control select the Column and drag the image from the Form's controls toolbox.






Re: Grid modification within the Form Designer

MarciaAkins

rpp wrote:

I am trying to show an image in each record within in a grid can this be done

You will be better off to do this in code in the Init() method of the grid. Here is some sample code to help get you started. It adds the flag for each country to the first column of the grid:

SELECT Country

SCAN

IF cCountry # '<unknown>'

THIS.colFlag.AddObject( "img" + ALLTRIM( cCountry ), "Image" )

ELSE

THIS.colFlag.AddObject( "imgUnknown", "Image" )

ENDIF

THIS.colFlag.Controls[ THIS.colFlag.ControlCount ].Picture = ALLTRIM( cIconFile )

THIS.colFlag.Controls[ THIS.colFlag.ControlCount ].BackStyle = 0

ENDSCAN

THIS.colFlag.DynamicCurrentControl = [IIF( NOT EMPTY( Clients.cCountry ), "img" + ALLTRIM( Clients.cCountry ), "imgUnknown" )]

This.colFlag.Width = 36







Re: Grid modification within the Form Designer

surinder singh

Select column.textbox control & drop new image control(image1) on it.

change column.textbox.currentcontrol to image control(image1).

Also set column.sparse = .F. ( to show image for all records)

Best Regards

Surinder