Activating existing tab in IE

Add-in Express™ Support Service
That's what is more important than anything else

Activating existing tab in IE
 
zac roberts




Posts: 25
Joined: 2009-05-07
Hi

I have an add in bar where I run search and open the results in a new tab.
If a search is run again from another tab, with the original results still open in another tab, I want to open the results in the tab with the original results.

I have no problem looping through the tabs and finding the relevant tab and loading the new results in it but I cannot activate that tab to bring it to the front

I have been through the AdvancedSearch example and trying for a ages but it as if the ActivateTab() does not work.

I am using the latest 2009 version downloaded yesterday.

In my add in bar code I am looping round the tabs using GetModuleByIndex(i), finding the right tab using a function in the IEModule reading the HTMLDoc.Title and then calling a function in the IEModule containing Me.ActivateTab(). Also tried ShowWindow and even sending messsages...

If you could help it would be superb.
Thanks in advance
Zac



Posted 28 May, 2009 18:40:13 Top
Andrei Smolin


Add-in Express team


Posts: 14104
Joined: 2006-05-11
Hi Zac,

Here is an excerpt from the manual:

The IsTabbedBrowsingEnabled property of the IE module informs you whether tabbing is enabled or not. When the user opens a tab, the OnTabCreated and then OnTabActivated events are raised. At appropriate moments OnTabMoved and OnTabClosed occur. You can activate any given tab programmatically only if ADXIEModule.IsQuickTabsEnabled is true; this means that the Quick Tabs feature in IE7 and IE8 is enabled. To activate a tab, you call TabActivate; this causes OnTabChanging and OnTabChanged events to fire. In IE6, you use the OnConnect event of the module to get to know when a window is opened and use the HTML Events component (Handling HTML Events) to handle the OnActivate event of the Window HTML element.


Does this help?

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 29 May, 2009 06:07:42 Top
zac roberts




Posts: 25
Joined: 2009-05-07
Hi Andrei

I had read that. I call TabActivate() in the right instance of the IEModule and the events do fire however the tab remains behind the current tab and does not come to the front

Zac
Posted 29 May, 2009 10:47:13 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Zac.

Please send us the code that reproduces the issue.
Posted 29 May, 2009 11:11:41 Top