Making a Bean a Container

You can use visual beans in your forms as containers. When you select a container component from the component palette, the Form Editor assigns the component a layout manager. You can then add other components to the container component.

To make the component a container:

  1. Choose Tools and choose Options from the main window.
  2. In the Options window, expand the Component Palette node and the Beans node within it.
  3. Select the bean you want to make a container.

    The Is Container property for that component appears in the property sheet pane of the Options window.

  4. Select True from the Is Container property combo box.
Tip Because the Form Editor does not recognize any subcomponents in your bean, they are not listed in the Component Inspector. In addition, the container and layout manager code generated by the Form Editor could conflict with the original placement of the subcomponents.

To keep the Form Editor from creating container code that conflicts with the subcomponents, set Is Container to false. Although the subcomponents will not be listed in the Component Inspector, they will appear in the Form Editor window and should work correctly in your program.

See also
Creating a Bean
Setting a Bean's Icon
Adding a Bean to the Component Palette
Customizing a Bean

Legal Notices