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
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_bReady
to true so that the GroupCheck control's add
method 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.