Solved

change disabled textbox's text color

Posted on 2004-09-02
5
506 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

713 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