//Collection IndexOf method public int IndexOf(TabPage item) { return List.IndexOf(item); }
public void CopyTo(TabPage[] array, int index) { List.CopyTo(array, index); }
public void Remove(TabPage Tab) { List.Remove(Tab); }
public bool Contains(TabPage Tab) { return List.Contains(Tab); }
public void Insert(int index, TabPage item) { List.Insert(index, item); }
/// <summary> /// Adds a new error to the collection /// </summary> public void Add(TabPage Tab) { List.Add(Tab); Parent.Controls.Add(Tab); }
/// <summary> /// Fixes up the ActionLink property to final script code /// suitable for an onclick handler /// </summary> /// <returns></returns> protected string FixupActionLink(TabPage Tab) { string Action = Tab.ActionLink; if (Action.ToLower() == "default" || string.IsNullOrEmpty(Action)) Action = "ActivateTab('" + ClientID + "','" + Tab.TabPageClientId + "');"; // If we don't have 'javascript:' in the text it's a Url: must use document to go there else if (Action != "" && Action.IndexOf("script:") < 0) Action = "document.location='" + Action + "';"; return Action; }
public void AddTab(TabPage Tab) { Tab.ID = ID + "_" + (TabCounter++).ToString(); _Tabs.Add(Tab); }
/// <summary> /// Adds a new item to the Tab collection. /// </summary> /// <param name="Caption">The caption of the tab</param> /// <param name="Link">The HTTP or JavaScript link that is fired when the tab is activated. Can optionally be Default which activates the tab and activates the page ID.</param> /// <param name="TabPageClientId">The ID for this tab - map this to an ID tag in the HTML form.</param> public void AddTab(string Caption, string Link, string TabPageClientId) { TabPage Tab = new TabPage(); Tab.Caption = Caption; Tab.ActionLink = Link; Tab.TabPageClientId = TabPageClientId; Tab.ID = ID + "_" + (TabCounter++).ToString(); AddTab(Tab); Page.Response.Write("Add Tab"); }