Hi,
Well, By saying it's acting strange I meant: I have 2 simple checkboxes cDeprecated and cOnHold. cOnHold cannot be set True if cDeprecated already are True. WHAT part is working great on all events (click, keypress and etc.). However the problem starts, when I try to check cOnHold to be True when cDeprecated is False - cOnHold cannot be checked at all by clicking it or by pressing space (by pressing space you can see how checkbox is checked and then unchecked)
Here's code:
Click event
keyPress event
Method
P.S. I forgot to mention that theses checboxes are DevExpress checkEdit
Well, By saying it's acting strange I meant: I have 2 simple checkboxes cDeprecated and cOnHold. cOnHold cannot be set True if cDeprecated already are True. WHAT part is working great on all events (click, keypress and etc.). However the problem starts, when I try to check cOnHold to be True when cDeprecated is False - cOnHold cannot be checked at all by clicking it or by pressing space (by pressing space you can see how checkbox is checked and then unchecked)
Here's code:
Click event
VB.NET:
Private Sub cOnHold_MouseClick(sender As Object, e As MouseEventArgs) Handles cOnHold.MouseClick
If (cOnHold.Checked = False) Then
ToogleOnHold()
Else : cOnHold.Checked = False
End If
End Sub
VB.NET:
Private Sub cOnHold_KeyPress(sender As Object, e As KeyPressEventArgs) Handles cOnHold.KeyPress
If (cOnHold.Checked = False) Then
ToogleOnHold()
Else : cOnHold.Checked = False
End If
End Sub
Method
VB.NET:
Public Sub ToogleOnHold()
If (cDeprecated.Checked = True) Then
cOnHold.Checked = False
MessageBox.Show("This requirement is already " + cDeprecated.Text + " and cannot be " + cOnHold.Text + "!")
Else
cOnHold.Checked = True
End If
End Sub
P.S. I forgot to mention that theses checboxes are DevExpress checkEdit