CreateOnDemand – PB Docs 150

CreateOnDemand property for PowerScript controls

Controls

Tab controls

Description

When CreateOnDemand is enabled, all controls on all tab pages
of a Tab control are instantiated when the Tab control is created,
but the Constructor event of controls on hidden tab pages is not
triggered until the user views the tab page either by clicking on
the tab page or by calling the SelectTab function (the SelectTab function
sets the SelectedTab property). Until the Constructor event for
a control has run, a graphical representation of the control is
not created, and its handle is not available. Constructor events
for controls on the selected tab page are always triggered when
the Tab control is created.

A window opens more quickly if the creation of a graphical
representation is delayed for tab pages with many controls. However,
scripts cannot refer to a control on a tab page until its Constructor
event has run and a graphical representation has been created.

Usage

In a painter

proc.png To set the CreateOnDemand property:

  1. Select the CreateOnDemand check box on
    the General page of the tab control’s Properties view.

In scripts

The CreateOnDemand property takes a boolean value. The following
example specifies that graphical representations of tab pages are
not created until the tab page is selected:

For more information about using this property in scripts,
see the chapter on using tab controls in a window in Application
Techniques
.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x