Hide

SftTabs/OCX 6.5 - Tab Control for VB6

Display
Print

SftTabs.Switching Event

A new tab is about to become active.

Syntax

VBPrivate Sub object_Switching(NextTab As Integer, Allow As Boolean, Refresh As Boolean)

object

A SftTabs object.

NextTab

The index of the next tab about to become the active tab. An application can modify this value to force a different tab to become the active tab, in which case Allow must be set to True.

Allow

An application can set Allow to False to prevent the new tab from becoming the active tab. If Allow is set to False, the currently active tab remains unchanged and a Switched event is not generated. The default is True.

Refresh

After the current tab and all its associated controls become inactive (i.e., are hidden), SftTabs/OCX automatically repaints the client area (using the Refresh method). Under certain circumstances this may result in too much repaint activity. This is usually the case if the associated controls fill the entire client area, in which case Refresh could be set to False. The default is True.

Comments

The Switching event occurs when a new tab is about to become active.

The Switching event notifies an application that a new tab and all its associated controls are about to become the active tab.

This notification can be used to validate input data in the controls associated with the (still) current tab. If data validation fails, Allow can be set to False to prevent the new tab NextTab from becoming active.

The Tabs.Current property contains the index of the currently active tab. NextTab contains the index of the tab about to become active.

If a message box (or another form) is displayed while the Switching event is being processed, tab switching is aborted and the current tab remains the active tab.

See Also SftTabs Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.