Glossary Item Box

AspLib component library Send comments on this topic.

Client API

Client-side API and events

TabStrip exposes a rich client side API. Also user may define event-handlers for main control events such as clicking, requesting or mouse-hovering tabs.

Event

Description

OnTabChanged The client-side script that is executed when selected tab is changed.
OnTabChanging The client-side script that is executed before the active tab is changed.
OnTabMouseOver The client-side script that is executed when the user moves the mouse pointer into a tab.
OnTabMouseOut The client-side script that is executed when the user moves the mouse pointer outside the boundaries of a tab.
OnTabRequested The client-side event that is fired after the control AJAX callback returns the tab content.
OnTabRequesting The client-side event that is fired before the control fires an AJAX callback.

 

This events may be defined using property editor or by using specialized client-side events editing dialog.

 

To call client-side events dialog press [...] button or call [Edit client side events...] command from smart-tag panel. After this dialog appears:

 

Also control has some client API fuctions to manipulate with it on client machine.

Function name

Description

al_TabStrip_SetEnable(clientID, enable) Enables or disables the control with given identifier clientID, new state sets with enable value
al_TabStrip_IsEnabled(clientID) Returns is the control enabled or not
al_TabStrip_SetVisible(clientID, visible) Shows or hides the control with identifier clientID, new state depends on visible value
al_TabStrip_IsVisible(clientID) Returns is the control visible or not
al_TabStrip_SetActiveTabIndex(clientID, tabIndex) Set tab with index tabIndex as active and selects it.
al_TabStrip_GetActiveTabIndex(clientID) Returns the active tab index.
al_TabStrip_SetTabEnabled(clientID, enable, tabIndex) Sets tab with index tabIndex enabled or disabled.
al_TabStrip_SetActivateTabBehavior(clientID, behavior) Set the activate tab action type - click or mouse hovering over tab. Behavior will depends on behavior parameter. Possible values are: "mouseover" and "click".
al_TabStrip_IsTabEnabled(clientID, tabIndex) Determines whether tab with index tabIndex is enabled
al_TabStrip_SingleRowMode(clientID, bSingle, nWidth) Switches the control with identifier clientID from multi row interface to single row interface (bSingle parameter), if bSsingle equals true (to single row interface), than nWidth parameter sets the new control width (in percent or pixel).

 

Code sample:

<button onclick="al_TabStrip_SetVisible('TabStrip1', false)">Hide</button>
<button
onclick="al_TabStrip_SetVisible('TabStrip1', true)">Show</button>
<button
onclick="alert(al_TabStrip_IsVisible('TabStrip1'))">Is visible</button>
<button
onclick="al_TabStrip_SetEnable('TabStrip1', true)">Enable</button>
<button
onclick="al_TabStrip_SetEnable('TabStrip1', false)">Disable</button>
<button
onclick="alert(al_TabStrip_IsEnabled('TabStrip1'))">Is enabled</button>
<button onclick="alert(al_TabStrip_GetActiveTabIndex('TabStrip1'))"> Get active</button>
<button
onclick="al_TabStrip_SetActiveTabIndex('TabStrip1', 0)">Set active tab 0</button>
<button
onclick="al_TabStrip_SetActiveTabIndex('TabStrip1', 1)">Set active tab 1</button>
<button
onclick="al_TabStrip_SetTabEnabled('TabStrip1', true, 2)">Set tab 2 enabled</button>
<button
onclick="al_TabStrip_SetTabEnabled('TabStrip1', false, 2)">Set tab 2 disabled</button>
<button
onclick="alert(al_TabStrip_IsTabEnabled('TabStrip1', 2))">Get tab 2 enable status</button>
<button
onclick="al_TabStrip_SingleRowMode('TabStrip1', true, '90%');return false;">Set width 90%</button>
<button
onclick="al_TabStrip_SingleRowMode('TabStrip1', false);return false;">Set original width</button>
<button
onclick="al_TabStrip_SingleRowMode('TabStrip1', true, '500px');return false;">Set width 500px</button>
<button
onclick="al_TabStrip_SingleRowMode('TabStrip1', false);return false;">Set original width</button>

 

 

 


© 2002-2007 Astron Digital. All Rights Reserved.