Hi Timothy,
The data type and functionality of the ActiveTab property has bothered me as well.
I've added a new .ActiveTabIndex [int] property and changed the .ActiveTab property to get/set a Tab object.
NOTE: THIS IS A BREAKING CHANGE FOR V0.6, see
http://forums.ext.net/showthread.php...1404-12-1.aspx.
The .ActiveTabIndex is zero based, therefore the first tab in the .Tabs collection has the index of '0'.
The follow code sample demonstrates using markup to set the ActiveTabIndex to the second <ext:Tab>.
Example
<ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="1" Title="Title">
<tabs>
<ext:Tab ID="Tab1" runat="server" Title="Tab 1" />
<ext:Tab ID="Tab2" runat="server" Title="Tab 2" />
</tabs>
</ext:TabPanel>
The following sample demonstrates setting the .ActiveTabIndex from the <Click> AjaxEvent of an <ext:Button>.
Example
<%@ Page Language="C#" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Button1_Click(object obj, AjaxEventArgs e)
{
this.TabPanel1.ActiveTabIndex = 1;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Coolite Toolkit : Setting the .ActiveTabIndex on an AjaxEvent</title>
</head>
<body>
<p><a href="ActiveTabIndex.aspx">Reload</a></p>
<form id="Form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" runat="server" />
<ext:TabPanel ID="TabPanel1" runat="server" Height="300">
<Tabs>
<ext:Tab ID="Tab1" runat="server" Title="Tab 1" Html="Tab 1" />
<ext:Tab ID="Tab2" runat="server" Title="Tab 2" Html="Tab 2" />
</Tabs>
</ext:TabPanel>
<ext:Button ID="Button1" runat="server" Text="Submit">
<AjaxEvents>
<Click OnEvent="Button1_Click" />
</AjaxEvents>
</ext:Button>
</form>
</body>
</html>
Hope this helps.