Is Container property
A component's
Is Container
property enables you to choose whether or not to have the component treated as a container.To access a component's Is Container property:
- Choose Tools | Global Options... from the main menu to display the Global Options window.
- Expand the
Component Palette
node and the component's palette category node.- Select the node for the component.
The Is Container property for that component will appear in the property sheet pane.
If the
Is Container
property is set toTrue
, you can use the component in your forms as a container. When you select such a component from the Component Palette, the Form Editor will assign the component a layout manager, and you will be able to add other components to it.However, if the JavaBeans component you have created contains sub-components, these sub-components will not be recognized by the Form Editor. In addition, the container and layout manager code that the Form Editor generates could conflict with the original placement of your components.
To keep the Form Editor from creating container code which could conflict with your sub-components, you can set
Is Container
toFalse
. Even though the Form Editor will not recognize the sub-components (they will not be listed in the Component Inspector), they will appear in the Form Editor window and should work correctly in your program.
Contents | Prev | Next | Index |