Hello,
I want to be able to close the active tab and close all tabs but the active tab. I've been trying to accomplish this using commands #32937 and #33255, but I've had no luck getting this to work. Has anyone been able to accomplish this?
Came across this post:
https://www.pdf-xchange.com/forum3 ... =36&t=5594
Could it be that it's still not fixed?
Thanks.
Close Active Tab & Close All Tabs but This
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Close Active Tab & Close All Tabs but This
Hello ap_mi,
That post is rather old, so the issue discussed there should have been fixed, but I will ask my colleagues from the dev team to take another look and confirm!
Regards,
Stefan
That post is rather old, so the issue discussed there should have been fixed, but I will ask my colleagues from the dev team to take another look and confirm!
Regards,
Stefan
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Close Active Tab & Close All Tabs but This
Hi ap_mi.
Unfortunately, but currently is impossible to use programmatically commands #32937(Close Active Tab) and #33255(Close All Tabs but This). These command are just for using in context menu for items in tab-bar.
Instead of using the 'Close Active Tab' you may use the #57602 (Close the Active Document) and instead of 'Close All Tabs but This' - you may make your own code that may close all opened documents excepting active one:
HTH.
Unfortunately, but currently is impossible to use programmatically commands #32937(Close Active Tab) and #33255(Close All Tabs but This). These command are just for using in context menu for items in tab-bar.
Instead of using the 'Close Active Tab' you may use the #57602 (Close the Active Document) and instead of 'Close All Tabs but This' - you may make your own code that may close all opened documents excepting active one:
Code: Select all
int activeDocId;
pdfCtl.GetActiveDocument(out activeDocId);
int docCnt;
pdfCtl.GetDocumentsCount(out docCnt);
ArrayOfInt docsToClose;
for (int i=0;i<docCnt;i++)
{
int id;
pdfCtl.GetDocumentID(i, out id);
if (id != activeDocId)
docsToClose.add(id);
}
for (id : docsToClose)
pdfCtl.CloseDocument(id);
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.