Skip to main content

Readonly corruption when returning from combobox validation

When the Combobox object is set to Readonly=False on the form. When the form goes through any validation step, Combobox automatically becomes Readonly=true.

The combobox, which is readonly =false, behaves as readonyl=true when returned after the form is stuck in the validation message.
In order to avoid distortion after returning from validation, the Readonly setting of the Combobox can be made in the OnBeginEdit section of the Form.

You can print the following code into the form's OnBeginEdit event.

public void OnBeginEdit()
{
List2.Enabled = false;
}