Collapsing: function(sender,args)
sender. Event source.
args. Event information.
The Collapsing event is occurs on closing tab.
A tab closes on clicking the header if the NavigationBar.IsAlwaysExpanded property is set to False.
To execute the example, the page must contain the NavigationBar component named NB (see Example of Creating the NavigationBar Component). Add handlers for the Collapsing and Expanded events:
NB.getItem(0).Collapsing.add(function (sender, args)
{
NB.getItem(0).getHeaderControl().setChecked(false);
});
NB.getItem(1).Collapsing.add(function (sender, args)
{
NB.getItem(1).getHeaderControl().setChecked(false);
});
NB.getItem(0).Expanding.add(function (sender, args)
{
NB.getItem(0).getHeaderControl().setChecked(true);
});
NB.getItem(1).Expanding.add(function (sender, args)
{
NB.getItem(1).getHeaderControl().setChecked(true);
});
After executing the example, clicking the title of the first tab sets checkbox for the control contained in the title (by default it is an instance of the CheckBox component). When the tab is collapsed (on second click, or on opening the second tab), the flag is unchecked. The same occurs when the second tab is opened or closed.
See also: