Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET TextBox BackColor issue

On a .NET page, I have a textbox. If I don't change the BackColor property, it looks flat. However, when using BackColor, e.g.:

txt.BackColor = System.Drawing.Color.Yellow;

the look changes to some sort of "3D" which I don't really like. Is it possible to avoid this effect?

first:

enter image description here

edited:

enter image description here

like image 432
AGuyCalledGerald Avatar asked Nov 04 '22 17:11

AGuyCalledGerald


1 Answers

It seems backcolor influences the borderstyle-property? which makes no sense to me, but I can simulate the look of a "normal" textbox like this

<asp:TextBox runat="server" ID="valueTxt" Enabled="false" BackColor="#E8E8E8" Width="50px" BorderStyle="NotSet" BorderWidth="1px" BorderColor="#B0B0B0"></asp:TextBox>
like image 104
AGuyCalledGerald Avatar answered Nov 15 '22 05:11

AGuyCalledGerald