Illusion Posted November 21, 2003 Posted November 21, 2003 Hello There, I was wondering, I have this code Dim ctrlTemp As Control For Each ctrlTemp In Me.Controls If TypeOf ctrlTemp Is TextBox Then ctrlTemp.Enabled = False Next ctrlTemp This disables all textboxes on my form, but is there a way to change the colour of the font while it is disabled.. As the Greyish font makes it hard to read? I tried ReadOnly .. but as ctrlTemp is a Control it doesn't have ReadOnly on it and I'm not to sure how to make it textbox and also work. If someone posts a way for ReadOnly to work, can the colour of the font be changed in this? Thanks Dan. Quote
techmanbd Posted November 21, 2003 Posted November 21, 2003 how about the lock property Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
Illusion Posted November 21, 2003 Author Posted November 21, 2003 I thought the lock property just locks it in design time, so you don't end up moving it if you're moving a lot of other stuff around? Quote
*Experts* mutant Posted November 22, 2003 *Experts* Posted November 22, 2003 If you want to use the ReadOnly property of the textbox then simpyl cast the control object to the TextBox object: If TypeOf ctrlTemp Is TextBox Then DirectCast(ctrlTemp, TextBox).ReadOnly = True Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.