Community
Showing results for 
Search instead for 
Do you mean 
Reply

SetTabPageActive

Copper Contributor
Posts: 42
Country: United States

SetTabPageActive

Good Morning!

 

I am looking to the use the UIContactManager to automatically adjust the view (which I know how to do) and change the active tab to Activities (which I do not know how to do).  I found this method, SetTabPageActive, but it takes an entityString as its parameter.  Does anyone have a working example of this?  Specifically, if possible, I am looking to open the Activities tab.  I've tried searching the SDK and these forums, not to mention the web at large, but I cannot seem to get it to work, especially since I'm basically guessing at which strings it wants.

Tuned Listener
Posts: 19
Country: USA

Re: SetTabPageActive

Have you solved this issue? I'm having the same challenge here.

Tuned Listener
Posts: 19
Country: USA

Re: SetTabPageActive

Heres's what I found how to set the TabPage to Activities.

 

          string sTabPage = Act.UI.UIGeneralManager.ACTIVITY;
          ACTapp.UIContactManager.SetTabPageActive(sTabPage);

 

UIGeneralManager class has a set of public fields that stroes all the existing Tab entity name. However, I haven't figure out how to get the entity name for custom tabs. Looking for helps.

Copper Super Contributor
Posts: 86
Country: United_Kingdom

Re: SetTabPageActive

Hi guys,

 

I would recommend simply getting a handle on the TabControl that hosts the tabs and the using it natively.

 

I firstly get a handle on the tab control using my own method called FindControls. I'll leave this part to you. For me it looks like this:

 

TabControl myTabControl = (TabControl)FindControls(actApp, "Tabs");

 

Get the name of every tab:

 

foreach (TabPage tp in myTabControl.TabPages)
{
    // MessageBox.Show(tp.Name);
}

 

Set tab by name:

 

myTabControl.SelectTab("NAME");

 

I hope this helps.

 

Kind regards,

 

Sam.

____________________________________________________________

Unfortunately I no longer work for Swiftpage International. Please do not send any queries to this account.
Tuned Listener
Posts: 19
Country: USA

Re: SetTabPageActive

Thanks Sam. That's exactly what I'm looking for.

Could you please give a little more details how to do the FindControl? I've already spent a lot of time id digging this out. It seems the light is almost there. Really appreciated.

Tuned Listener
Posts: 19
Country: USA

Re: SetTabPageActive

I got this to work. Thanks Sam.

Here's my code:

 

Control[] myControl=ActApplication.Controls.Find("Tabs",true);
TabControl myTabControl = new TabControl();
myTabControl = (TabControl)(myControl[0]);

Copper Super Contributor
Posts: 86
Country: United_Kingdom

Re: SetTabPageActive


stevewfgmail@yahoo.com wrote:

I got this to work. Thanks Sam.

Here's my code:

 

Control[] myControl=ActApplication.Controls.Find("Tabs",true);
TabControl myTabControl = new TabControl();
myTabControl = (TabControl)(myControl[0]);


Hi Steve,

 

Glad to hear that you got it working.

 

Kind regards,

 

Sam.

____________________________________________________________

Unfortunately I no longer work for Swiftpage International. Please do not send any queries to this account.