How to disable textbox without text going dull grey
Posted on 2012-08-25
The environment is a vb.net mobile app, using visual studio 2008, running on .net framework 3.5. The app runs on a Symbol 9090 mobile computer. I have text boxes on my forms such as total accumulators, that I don't want the user to be able accidentally focus on with the touch screen, i.e. if he does touch it, I want the app to completely ignore him.
I can accomplish this by setting the 'Enabled' property for that textbox to 'False'. But the problem is that the information showing in the text box--such as grand total--becomes a dull grey. The number in the field is no longer a dark black--like it was before I disabled it.
Note that I tried using the 'ReadOnly' property, setting it to 'True', and while it did not allow the user to enter data, it did allow them to focus on that field, placing the cursor there. So, that did not solve it.
Any way to make the text in the disabled text box look normal--or at least something better than a dull grey? TIA