I had the following code in my application to add tab and its associated control:
m_ultraTabControl.BeginUpdate(); UltraTab newTab; UltraTabsCollection tabs = m_ultraTabControl.Tabs; newTab = tabs.Add(); newTab.TabPage.Controls.Add(myControl); newTab.Tag = myObject; m_ultraTabControl.SelectedTab = newTab; m_ultraTabControl.EndUpdate();
I also subscribed to SelectedTabChanged event. The problem I have is: 1. for the first tab, SelectedTabChanged event fires in line "newTab = tabs.Add();";2. for the rest of the tabs, the event fires in line "m_ultraTabControl.SelectedTab = newTab;"
Is there a way to stop the first tab firing this event when I do tabs.Add()?
Thanks!
Mike2008,
I haven't been able to reproduce the behavior you are describing; I've added the code you are using into a Button Click and am only noticing the UltraTabControl's SelectedTabChanged event firing once, when setting its SelectedTab property. I've attached the sample I was using to test; let me know if there is a difference between the sample and what you are doing.
~Kim~
I tried your code with Infragistics v8.2.20082.2022.
The problem occurs in this version.
SelectedTabChanged event is fired when ultraTabControl1.Tabs.Add() for the first tab.It is OK for the rest of the tabs.
Any work around or is it fixed in recent 8.2 hotfix ?
Thanks.