Initializing “heavy” tabs

For windows containing Tab controls, if the Tab control contains more than five tab pages or the initialization of each tab page is complex, PowerServer recommends you use the CreateOnDemand method of Tab control to improve the runtime performance of these windows.

When CreateOnDemand is enabled, only the current tab page that is created will be initiated. The initialization of the hidden tab pages takes place only when they are selected. Therefore the window will operate more efficiently.

Please keep in mind that as you make this change you may also need to modify other code of the Tab control. For example, if the current tab page uses data from another page, you need to:

  1. Move the script that is used for obtaining data, to the SelectionChanged event.

  2. Add a condition to validate whether the tab page carrying the data has been initiated. If initiated, the current tab page will successfully obtain the data; if not initiated, the user must select the tab page for initialization purposes, and the current tab page will successfully obtain the data.