AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

Making a Text Box read only

Often times I have come across situations where I would want to make a read only text box.  It would need to behave like a picture box.  The problem is if you make the textbox disabled the text in the box will turn gray no matter what you set the color property to be.  If you make it locked you can still put the cursor inside the text box but you will not be able to edit the text.  The solution is to create a picture box that has no border. (So that it will be invisible). Next, you put the text box inside the picture box.  You then set the picture box's enabled property to false.  This will allow the text box to be read only.  If you then want the text box to be enabled, set the picture box enabled property to true.

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/