Built in UI control - Double Click

Hey There!

I have accessed a UI checkbox control to disable it on load if the field value it true. I have done it like this:

Control chkReceived = csm.GetNativeControlReference("myControlGUID");

However it it appears that even though it it successfully disabled and does not operate on a single click, it can be reactivated on a double click…

Is there any code for me to cancel this doubleClick event? In VB.Net i would do something like:

Private Sub MyCheckBox_DoubleClick(ByVal sender As Object, ByVal e As EventArgs)
  e.Handled = True
End Sub

in C#, i’ll assume

private void MyCheckBox_DoubleClick(object sender, System.EventArgs args)
   args.Handled = True

However System.EventArgs doesnt have a definition for Handled as per the error message

I need a way to prevent the chkbox enabling on a double click


I updated my code to ReadOnly instead of Enabled as i got a message saying Enabled was obsolete
chkReceived EpiCheckBox = (epiCheckBox)csm.GetNativeControlReference("GUID");

However im not get the expected behaviour…

On a ListChanged event

private void RcvHead_DataView_ListChanged(object sender, ListChangedEventArgs args)
   //Get the boolean value from the field
   bool chk = Convert.ToBoolean(RcvHead_DataView[0]["Received"]);

   //Handle the controls on / off based on chk
   chkReceived.ReadOnly = chk;
   dteDate.ReadOnly = chk;

The Boolean ‘chk’ is getting the correct values, i have checked that but when the list is changed, ReadOnly is not invoked. If i use Enabled, that is invoked but can be enabled on a double click…

what gives?


The resolve was to also handle the label to the checkbox…