Foundation > Rogue Wave Script Programming > Creating Rogue Wave Views Objects at Run Time
 
Creating Rogue Wave Views Objects at Run Time
In Rogue Wave Script for Rogue Wave® Views, you can use the new operator to create Rogue Wave Views objects at run time just as you would create other Rogue Wave Script native objects, such as strings, numbers, and so on.
You can create the following types of objects at run time:
*IlvPoint
*IlvRect
*IlvGadgetContainer
To create a gadget, such as an IlvButton, we recommend that you use Rogue Wave Views Studio.
IlvPoint and IlvRect
Certain Rogue Wave Views object methods take an IlvPoint or an IlvRect as their arguments. These can be created at run time as shown below:
var myPoint = new IlvPoint(20, 20);
myPanel.move(myPoint);
IlvGadgetContainer
You can create new panels at run time. Here is an example:
var size = new IlvRect(20, 20, 400, 300);
var myNewPanel = new IlvGadgetContainer("Panel", "My panel", size);
myNewPanel.readFile("panel.ilv");
myNewPanel.readDraw();
Application.addPanel(myNewPanel);
We recommend that you add the new panel to Application after it has been created.
For more information, see “Accessors for class IlvGadgetContainer” in the Gadgets Accessor Reference Manual.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.