Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Views User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

10.4 Creating Symbols on the Fly

Symbols can also be created programmatically. Remember, a symbol is a component that has the capability of linking to another symbol and of bearing a label. Each component can also act as a composite, which means it can consist of other components. Usually, a symbol is a collection of primitive components.

You can create a new symbol by adding subcomponents to it. You can collect subcomponents into a set and then pass it to the Create() method, as in Example 12.

Example 12: Adding a collection of subcomponents to a symbol

Or, you can add the subcomponents one by one using the AppendChild() or InsertChild() methods, as in Example 13.

Example 13: Adding subcomponents individually to a symbol

Remember that each composite component has its own coordinate system. If you added a rectangle with corners at (0,0) and (10,10), it would appear at the top left corner of the symbol whenever the symbol is displayed on the screen.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.