We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

VB.Net Read only textbox

sublimation
sublimation asked
on
Medium Priority
565 Views
Last Modified: 2011-10-03
Hello, when I set my textbox to read only, it becomes transparent in colour, what i mean by this is that instead of the wite background, it turns grey (same colour as my form).

The textbox(es) are surrounded by a group box, but i dont think that that is effecting it...?

What is happening?  i want to have the textboxes white, not grey?

Thanks
Comment
Watch Question

Commented:
are you making the textbox's enabled property = false or it's read only property to true?
CERTIFIED EXPERT

Commented:
Why not use a Label its a read only textbox and you dont have to set any properties and you can set the Border to look like a textbox

Author

Commented:
Hi, I need to use textbox and the enabled property is true.

Commented:
workaround:

Textbox1.ReadOnly = true
Textbox1.BackColor = System.Drawing.Color.White
CERTIFIED EXPERT

Commented:
or

Textbox1.Enabled= False
Textbox1.BackColor = System.Drawing.Color.White
CERTIFIED EXPERT
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.