CONTROL.TAB_SET Function

IN THIS PAGE

Syntax

.TAB_SET( Page_Number as N )

Arguments

Page_Number

The number of the tabbed control page to display.

Description

The .TAB_SET() method displays the specified tab page of a tabbed control.

Discussion 

The .TAB_SET() method displays the specified tab page of a tabbed control.

When the tab page is changed, two events are fired: CanTabChange fires just before the page change, and OnTabChange fires just after the page change. You can prevent a user from changing the tab page if certain conditions are not met by attaching a script to the CanTabChange event, and using the CANCEL() command in the script to prevent the tab page from being changed.

Example 

A form has a tab object called "tabbed1". The tab object has a button called "Next". This button has its "Always on top" property checked so that the button shows on all tab pages. When the user presses this button, the next tab page is displayed.

page = tabbed1.tab_get()
page = page + 1
tabbed1.tab_set(page)

This example changes the active page of the tabbed control to page 3.

dim ptr as P
dim fld as P
ptr = form.load("customerx")
ptr.show()
fld = ptr.child("TABBED1")
fld.Tab_set(3)

Limitations

Desktop applications only.

See Also