Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

change disabled textbox's text color

Posted on 2004-09-02
5
505 Views
Last Modified: 2013-12-25
How to change the text color of disabled textbox?
0
Comment
Question by:Cyber_Cus2
5 Comments
 
LVL 18

Accepted Solution

by:
JR2003 earned 50 total points
ID: 11962652
You can't.
The way to do this is to put the textbox in a container control like a frame and then disable the container.
see:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/VB_Controls/Q_21087585.html
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 11962692
Alternatively you can set the Locked property to true and leave Enabled as true
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 11964042
You can you, just have to do it in code

Private Sub Command1_Click()
Text1.Enabled = False
Text1.BackColor = vbRed
End Sub

this works


0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 11964080
Oeps, text color, didn't see that.
0
 

Author Comment

by:Cyber_Cus2
ID: 11964423
ok thanks for your answer
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

860 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