PageCreated PowerScript function
Description
Reports whether a tab page has been created.
Controls
User objects used as tab pages
Syntax
|
1 |
<span>userobject</span>.<span>PageCreated</span> ( ) |
|
Argument |
Description |
|---|---|
|
userobject |
The name of the tab page whose existence |
Return Values
Boolean. Returns true if
the user object is a tab page and has been created and false if
the user object is not a tab page or has not been created.
Usage
A window will open more quickly if the creation of graphical
representations is delayed for tab pages with many controls. However,
scripts cannot refer to a control on a tab page until the tab page’s
Constructor event has run and a graphical representation of the
control has been created. When the CreateOnDemand property of the
Tab control is selected, scripts cannot reference controls on tab
pages that the user has not viewed. PageCreated allows
you to test whether a particular tab page has already been created.
Examples
This example tests whether tabpage_2 has
been created and, if not, creates it:
|
1 |
IF tab_1.CreateOnDemand = True THEN |
|
1 |
   IF tab_1.tabpage_2.<span>PageCreated</span>() = False THEN |
|
1 |
      tab_1.tabpage_2.CreatePage() |
|
1 |
   END IF |
|
1 |
END IF |