Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable Controls Without Greying Them Out

Status
Not open for further replies.

TickerTimer

Programmer
Jul 2, 2010
7
GB
Hi

VB.Net

Is it possible to disable Text Boxes and Combo Boxes without the backcolor changing to grey - Am I missing the obvious?

Thanks
 
This works, although I would advise against it as a developer would typically want to adhere to Windows UI guidelines and let the disabled controls become grey.
Code:
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.TextBox1.Enabled = False
        Me.TextBox1.BackColor = Color.White
    End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top