表格细胞背景 [英] Table cells background
本文介绍了表格细胞背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都可以告诉我如何使用C#在运行时更改表格单元格背景颜色或
背景图片。
Karl-Inge
Hi,
Can anyone tell me how to change a table cells background color or
background image in runtime with C#.
Karl-Inge
推荐答案
您可以使用cssClass属性,例如
..TableCell1
{
background-image:url(" images / Image1.gif");
}
和你的C#代码:
TableCell td1 = new TableCell();
td1.CssClass =" TableCell1" ;;
//或者您可以在没有CssClass的情况下添加它:
td.Height =" 100px";
td1.Width =" 100px";
td1.Style.Add(" background-image"," url(''image1.gif'')");
-
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
" Karl-Inge Reknes"写道:
You can use the cssClass attribute, e.g.
..TableCell1
{
background-image:url("images/Image1.gif");
}
and in your C# code:
TableCell td1= new TableCell();
td1.CssClass = "TableCell1";
//or you can add it without a CssClass like this:
td.Height = "100px";
td1.Width = "100px";
td1.Style.Add("background-image", "url(''image1.gif'')");
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Karl-Inge Reknes" wrote:
任何人都可以告诉我如何使用C#在运行时更改表格单元格背景颜色或
背景图像。
Karl-Inge
Hi,
Can anyone tell me how to change a table cells background color or
background image in runtime with C#.
Karl-Inge
谢谢威廉姆斯
Karl-Inge
" Phillip Williams"写道:
Thanks Williams
Karl-Inge
"Phillip Williams" wrote:
你可以使用cssClass属性,例如
.TableCell1
{
background-image:url(" images) /Image1.gif");
}
和你的C#代码:
TableCell td1 = new TableCell();
td1.CssClass = TableCell1;
//或者你可以在没有这样的CssClass的情况下添加它:
td.Height =" 100px";
td1.Width =" 100px" ;;
td1.Style.Add(" background-image"," url(''image1.gif'')");
-
HTH,> Phillip Williams
http://www.societopia.net
http://www.webswapp.com
" Karl -Inge Reknes写道:
You can use the cssClass attribute, e.g.
.TableCell1
{
background-image:url("images/Image1.gif");
}
and in your C# code:
TableCell td1= new TableCell();
td1.CssClass = "TableCell1";
//or you can add it without a CssClass like this:
td.Height = "100px";
td1.Width = "100px";
td1.Style.Add("background-image", "url(''image1.gif'')");
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Karl-Inge Reknes" wrote:
任何人都可以告诉我如何使用C#在运行时更改表格单元格背景颜色或
背景图像。
Karl-Inge
Hi,
Can anyone tell me how to change a table cells background color or
background image in runtime with C#.
Karl-Inge
Hi Phillips
您的建议对我有所帮助在正确的方向,但我仍然有问题。
我试图制作一个类似于你在上面使用的标签式水平菜单
你的网络< a rel =nofollowhref =http://www.webswapp.comtarget =_ blank> http://www.webswapp.com 。
你有一个例子吗?
Karl-Inge
" Phillip Williams"写道:
Hi Phillips
Your suggestion help me in the right directions, but I have still problem.
Ia??m trying to make a tab style horizontal menu similar to that you use on top
of your web http://www.webswapp.com.
Do you have an example?
Karl-Inge
"Phillip Williams" wrote:
你可以使用cssClass属性,例如
.TableCell1
{
background-image:url(" images) /Image1.gif");
}
和你的C#代码:
TableCell td1 = new TableCell();
td1.CssClass = TableCell1;
//或者你可以在没有这样的CssClass的情况下添加它:
td.Height =" 100px";
td1.Width =" 100px" ;;
td1.Style.Add(" background-image"," url(''image1.gif'')");
-
HTH,> Phillip Williams
http://www.societopia.net
http://www.webswapp.com
" Karl -Inge Reknes写道:
You can use the cssClass attribute, e.g.
.TableCell1
{
background-image:url("images/Image1.gif");
}
and in your C# code:
TableCell td1= new TableCell();
td1.CssClass = "TableCell1";
//or you can add it without a CssClass like this:
td.Height = "100px";
td1.Width = "100px";
td1.Style.Add("background-image", "url(''image1.gif'')");
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Karl-Inge Reknes" wrote:
任何人都可以告诉我如何使用C#在运行时更改表格单元格背景颜色或
背景图像。
Karl-Inge
Hi,
Can anyone tell me how to change a table cells background color or
background image in runtime with C#.
Karl-Inge
这篇关于表格细胞背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文