Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grid cell background

Status
Not open for further replies.

hyonos

Technical User
Apr 2, 2003
46
IT
how can i set a cell background ?
for example i have a table with 2 culomn

| column 1 | column 2
--------------------------------------------------------
1° recod: | value1 | bg img=caffè.bmp and value=123
2° record | value2 | bg img=beer.bmp and value=445


can anyone help me ?
 
hyonos

Can you explain "Cell background?" Do you want to show a bitmap in the grid cell? Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
my english is awful...
i show you with html code:

<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td width=&quot;18%&quot;>record1</td>
<td width=&quot;82%&quot; background=&quot; background
image is a printer</td>
</tr>
<tr>
<td>record2</td>
<td background=&quot; in this record
is an email</td>
</tr>
</table>

in this case i have a cell with background image and in the cell i can write or insert value or other image...

i hope to be clear ...
 
Hyonos

Wrong forum, this is HTML code, this is a VFP forum. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
hyonos

How about faq184-2348. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
hyonos

I don't hink it is possible with the default VFP grid. Why not just use the SCGrid activex? Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hyonos,

Sorry I misunderstood your question. Not your fault.

You want to display a bitmap in a cell of a grid. Unfortunately, you cannot do that with a native VFP control. You might be able to find an ActiveX control that will let you do it.

Mike
Mike Lewis
Edinburgh, Scotland
 
mmm... i know, whit standard control it is impossible...
but if i create new control ?
i can create my own grid control.. right ?

for example, i can create a control whit:

myGrid
column1
header1
text1
column2
header1
text1 (this if i want add text value)
image1 (this is for backgroung image)

in column2 i can insert backgroung picture (image1) and text value (text1).
the program must process image1 like backgound color and text value must be show over image1

it is possible ?
 
hyonos

If you were to create a class using a container and add an image control and a label to the container, you can then add that class to a column as use it as the active control.

The label would need to be on top of the image control.
FAQ184-2483 - the answer to getting answered.​
Chris [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top