Lock controls i.e. combo box etc

  • Thread starter Thread starter Harshil Patel
  • Start date Start date
H

Harshil Patel

Hi

I am trying to lock fields on my form (VB.NET), so that they cannot be
edited by the user. So far I have accomplished my goal for the text box
by setting its read only property. But what should I do for combo box
and mask edit box (added as an reference). list box etc. I don't want to
use the enabled property, since that makes the controls text to fade or
not seen prominently.

Does anyone know how can we achieve this in VB.NET ??

Thanks
 
Hello,

Harshil Patel said:
I am trying to lock fields on my form (VB.NET), so
that they cannot be edited by the user. So far I
have accomplished my goal for the text box
by setting its read only property. But what should
I do for combo box and mask edit box (added
as an reference). list box etc.
I don't want to use the enabled property, since that makes
the controls text to fade or not seen prominently.

The colors depend on the system settings. If the user doesn't like them, he
can adjust them.
 
You have to do the following for ComboBox

'Set the following property in the property window or at form load
ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList

Ganesh J. Acharya
& Student at karrox 2003 Evening, Dombivali Branch, INDIA
 
Hi Herfried,

|| || I don't want to use the <enabled> property, since that
|| || makes the controls text to fade or not seen prominently.
||
|| The colors depend on the system settings.

I didn't know the system has settings for ghosted controls. ;-)

Regards,
Fergus
 
Back
Top