Switch document tab programmatically  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
User avatar
MartinCS
User
Posts: 153
Joined: Thu Apr 07, 2011 10:01 am
Contact:

Switch document tab programmatically

Post by MartinCS »

Hi,

Is there a method for programmatically setting the active tab when multiple documents are open?

Thank you in advance for your help!


Martin
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Switch document tab programmatically

Post by Sasha - Tracker Dev Team »

Hello Martin,

Do you mean setting active document tab? And how do you want to choose it - by name, index etc?
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
MartinCS
User
Posts: 153
Joined: Thu Apr 07, 2011 10:01 am
Contact:

Re: Switch document tab programmatically

Post by MartinCS »

Hi Sasha,

That's correct, I would like to set the active document tab - preferably using the windowId of the PDF document.

Code: Select all

this.pdfCtl.Doc.ID
Is this possible?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Switch document tab programmatically  SOLVED

Post by Sasha - Tracker Dev Team »

Try using

Code: Select all

pdfCtl.Doc.ActiveView.Activate();
or you can try this

Code: Select all

int i = 1;//Index of the document
pdfCtl.Inst.ActiveMainView.DocViewsArea.DocViews[i].Activate();
HTH
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
MartinCS
User
Posts: 153
Joined: Thu Apr 07, 2011 10:01 am
Contact:

Re: Switch document tab programmatically

Post by MartinCS »

Hi Sasha,

It's working perfectly.

Thank you for your help!
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Switch document tab programmatically

Post by Sasha - Tracker Dev Team »

Glad to hear that Martin :wink:
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply