VB.Net Read only textbox

Posted on 2004-03-31
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?

Question by:sublimation
  • 3
  • 2
LVL 18

Expert Comment

ID: 10724804
are you making the textbox's enabled property = false or it's read only property to true?
LVL 48

Expert Comment

ID: 10724816
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 Comment

ID: 10724837
Hi, I need to use textbox and the enabled property is true.
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

LVL 18

Expert Comment

ID: 10724856

Textbox1.ReadOnly = true
Textbox1.BackColor = System.Drawing.Color.White
LVL 48

Expert Comment

ID: 10724954

Textbox1.Enabled= False
Textbox1.BackColor = System.Drawing.Color.White
LVL 48

Accepted Solution

Mikal613 earned 250 total points
ID: 10724957
disregard that sorry

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Footer for each row on Gridview 2 33
Can't disable touch pad on Windows 10 computer 16 45
Finding the IIS version 5 22
how to just get time from a date 6 34
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question