To create a new widget at runtime, you can either create it from scratch, create one based on a template, or clone an existing widget. The createWidget() or cloneWidget() API functions are used to do this. When a new widget is created or cloned, it goes into a constructed widget "holding area". Set any properties you wish to set before using it, and then add the widget to a page, using the AddWidget() method of the page (supplying the name of the widget to add). You can add it to the current page or to any other page, including pages you create at runtime (more on this below).