Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Keeping track of tab pages – PB Docs 2019 – PowerBuilder Library

Keeping track of tab pages – PB Docs 2019

Keeping track of tab
pages

To refer to the controls on a tab page, you need the user object
reference, not just the index of the tab page. You can use the tab
page’s Control property array to get references to all your tab
pages.

Control property for tab
pages

The Control property of the Tab control is an array with a
reference to each tab page defined in the painter and each tab page
added in a script. The index values that are passed to events match the
array elements of the Control property.

You can get an object reference for the selected tab using the
SelectedTab property:

In an event for the Tab control, like SelectionChanged, you can
use the index value passed to the event to get a reference from the
Control property array:

Adding a new tab page

When you call OpenTab, the control property array grows by one
element. The new element is a reference to the newly opened tab page.
For example, the following statement adds a new tab in the second
position in the Tab control:

The second element in the control array for tab_1 now refers to
uo_newtab, and the index into the control array for all subsequent tab
pages becomes one greater.

Closing a tab page

When you call CloseTab, the size of the array is reduced by one
and the reference to the user object or page is destroyed. If the closed
tab was not the last element in the array, the index for all subsequent
tab pages is reduced by one.

Moving a tab page

The MoveTab function changes the order of the pages in a Tab
control and also reorders the elements in the control array to match the
new tab order.

Control property array for user objects

The Control property array for controls in a user object works
in the same way.


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