I'm new to C#, i searched how to get a transparent background for a textBox and i found this code:
我是C#的新手,我搜索了如何获得textBox的透明背景,我找到了这段代码:
<asp:textbox runat="server" id="textTest" style="background-color: transparent;"></asp:textbox>
i need it for the textBox1 in Form4
我需要它为Form4中的textBox1
2 个解决方案
#1
0
go to the code view of the form and add the style attribute from the code you found to the textbox1 as shown.
转到表单的代码视图,并将找到的代码中的style属性添加到textbox1中,如图所示。
<asp:textbox runat="server" id= "textbox1" style="background-color: transparent;"><asp:textbox>
#2
0
Wherever you have the code for textBox1
in Form4
, e.g
无论你在Form4中拥有textBox1的代码,例如
<asp:textbox runat="server" id="textBox1">
If you can't find this hit Ctrl + F
, change Look in:
to Current Project, then search for textBox1.
如果找不到此按Ctrl + F,请将Look in:更改为Current Project,然后搜索textBox1。
Change it to:
将其更改为:
<asp:textbox runat="server" id="textBox1" style="background-color: transparent;">
Or in your CSS file add:
或者在你的CSS文件中添加:
#textBox1
{
background-color:transparent;
}
#1
0
go to the code view of the form and add the style attribute from the code you found to the textbox1 as shown.
转到表单的代码视图,并将找到的代码中的style属性添加到textbox1中,如图所示。
<asp:textbox runat="server" id= "textbox1" style="background-color: transparent;"><asp:textbox>
#2
0
Wherever you have the code for textBox1
in Form4
, e.g
无论你在Form4中拥有textBox1的代码,例如
<asp:textbox runat="server" id="textBox1">
If you can't find this hit Ctrl + F
, change Look in:
to Current Project, then search for textBox1.
如果找不到此按Ctrl + F,请将Look in:更改为Current Project,然后搜索textBox1。
Change it to:
将其更改为:
<asp:textbox runat="server" id="textBox1" style="background-color: transparent;">
Or in your CSS file add:
或者在你的CSS文件中添加:
#textBox1
{
background-color:transparent;
}