MikeORTEC
asked on
setting the backcolor for a disabled textbox
I have been working on trying to set the color of a disabled textbox. You can see some different things that I have tried. It seems that if I use the "vbColor" property that I can get the backcolor set to vbBlue, vbRed, etc., but if I try to use system colors, I wind up with white. I thought that if I set the textbox control to enabled = false that vb would "grayout" the box, but it doesnt look like it...any assistance?
If optSealed.Value <> True Then
dblNewActUnitsValue = dblNewActValue / dblOldMassOrVolUnit
lblActConcUnitsLabel.Capti on = "" & strActivityUnit & "/" & strOldMassOrVolUnit & ""
Else
txtMassOrVolume.ForeColor = Gray 'returns a white background
txtMassOrVolume.Enabled = False
txtUncPercOneSigMassOrVol. Enabled = False
txtUncPercOneSigMassOrVol. ForeColor = NavajoWhite 'returns a white background
txtRefActConc.Enabled = False
txtRefActConc.BackColor = Silver 'returns a black background
txtUncPercActConcOneSig.En abled = False
txtUncPercActConcOneSig.Ba ckColor = Silver 'returns a blank background
lblActConcUnitsLabel.Capti on = "" & strActivityUnit & ""
End If
is there a property that I can set that will gray out the box when it is disabled to show that you cannot type a number in the box?
Thanks.
Mike
If optSealed.Value <> True Then
dblNewActUnitsValue = dblNewActValue / dblOldMassOrVolUnit
lblActConcUnitsLabel.Capti
Else
txtMassOrVolume.ForeColor = Gray 'returns a white background
txtMassOrVolume.Enabled = False
txtUncPercOneSigMassOrVol.
txtUncPercOneSigMassOrVol.
txtRefActConc.Enabled = False
txtRefActConc.BackColor = Silver 'returns a black background
txtUncPercActConcOneSig.En
txtUncPercActConcOneSig.Ba
lblActConcUnitsLabel.Capti
End If
is there a property that I can set that will gray out the box when it is disabled to show that you cannot type a number in the box?
Thanks.
Mike
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
M