Change Names of Document Tabs

PDF-XChange Editor SDK for Developers

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

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
jeffp
User
Posts: 878
Joined: Wed Sep 30, 2009 6:53 pm

Change Names of Document Tabs

Post by jeffp » Tue Aug 31, 2021 1:03 am

After making changes in the IPXC_DocSrcInfo from the TPXV_Control, the name displayed on the document tabs across the top do not change.

FControl.Frame.View.DocViewsArea.DocViews.Doc.CoreDoc.SrcInfo.CustDispTitle:= 'New PDF';
FControl.Frame.View.DocViewsArea.DocViews.Doc.CoreDoc.SrcInfo.CustDispFileName := 'New PDF.pdf';
FControl.Frame.View.DocViewsArea.DocViews.Doc.CoreDoc.SrcInfo.CustFileName:= 'New PDF.pdf';

I'm working with new files that haven't been saved yet. They just get the name "New Document" and I want to change that name.

How do I change the name appearing on the document tabs?

--Jeff

zarkogajic
User
Posts: 1056
Joined: Thu Sep 05, 2019 12:35 pm

Re: Change Names of Document Tabs

Post by zarkogajic » Tue Aug 31, 2021 7:49 am

Hi Jeff,

Try with

Code: Select all

IPXV_Inst Inst;
IPXV_Document Document;
IEvent evt;

---

Document.CoreDoc.SrcInfo.CustDispTitle := 'custom title';

evt := Document.EventServer.CreateNewEvent(Inst.Str2ID('e.document.propsChanged'), Param_T(Document), DocViewFlag_DisplayDocTitle);
Document.EventServer.FireEvent(evt, Document);
p.s.
Some further info: https://forum.tracker-software.com/viewtopic.php?f=66&t=34482&p=143413

-žarko

jeffp
User
Posts: 878
Joined: Wed Sep 30, 2009 6:53 pm

Re: Change Names of Document Tabs

Post by jeffp » Tue Aug 31, 2021 2:16 pm

That worked. Thanks!

Post Reply