Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The WFC Component Builder creates the methods and fields needed to define and implement your custom properties. Typically, you modify this code to provide your own implementation.
To add code to your property methods
For the
getCheckedmethod to return the checked state of the CheckBox control, replace the code that was added by the WFC Component Builder with the following line of code:return checkBox1.getChecked();For the
setCheckedmethod to set the checked state of the CheckBox control, as well as call other methods that this scenario needs, replace the code that was added by the WFC Component Builder with the following lines of code:checkBox1.setChecked(value); onCheckedChanged(Event.EMPTY); enableControls(this, value);This code sets the checked state of the CheckBox control based on the value that is passed to the property's method. The code also calls the
onCheckedChangedmethod and makes a call to theenableControlsmethod. The call to theonCheckChangedmethod triggers a custom event,checkedChanged, which will be added later in this scenario.The
Event.EMPTYvalue passed toonCheckedChangeddefines an empty Eventobject to be assigned to thecheckedChangedevent. The call to theenableControlsmethod is used to enable or disable controls that are added to the GroupCheckcontrol. This method will also be added later in this scenario.
The next step is to add an event to your control.