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.
To provide initial settings for your control, you add code to the constructor. For the GroupCheck control, you add code that sets the control properly when it is added to a form.
To add code to the constructor
Replace the code in the constructor for the GroupCheck control with the following lines of code:
super(); initForm(); setStyle(this.STYLE_ACCEPTSCHILDREN, true); m_bReady = true;This code sets the style of the GroupCheck control to one that accepts child controls. The code also sets the private member variable
m_bReadyto true so that the GroupCheck control'saddmethod knows that the control is finished initializing and can accept controls to be added to the GroupBox control.
The next step is to build the control.