When changing the IPXC_DocSrcInfo's CustDispTitle: e.document.propsChanged with DocViewFlag_DisplayDocTitle needs to be fired for the corresponding IPXV_Document so that its Tab grabs the change and updates its display. This all works as expected.
However, I also need to set the TitlePrefix of the document's tab IUIX_LayoutItem (which is the actual tab).
It seems that your internal update, after event fired, of the IUIX_LayoutItem Title happens in "async mode" after e.document.propsChanged BUT also removes TitlePrefix value - and the tab displays only the new Title and not the TitlePrefix.
Or, in (kind of pseudo) code:
Code: Select all
Document.CoreDoc.SrcInfo.CustDispTitle := 'my new Title';
evt := Document.EventServer.CreateNewEvent(e.document.propsChanged, Document, DocViewFlag_DisplayDocTitle);
Document.EventServer.FireEvent(evt, Document);
//here - e.document.propsChanged can be caught in pxvControl's OnEvent
//but the Document.ActiveView.Obj.Parent.LI.Title is still the old one
//then , this line should change the tab's title prefix but does not ... so the actual Title change and TitlePrefix reset happens later
Document.ActiveView.Obj.Parent.LI.TitlePrefix := "some prefix";
Seems that the actual change of the tab's title happens "much" after the e.document.propsChanged can be caught.
And, as stated, new Title value resets my TitlePrefix value.
So, question: how/when to catch when the tab's title actually does get changed, and TitlePrefix, reseted, so I can set back the TitlePrefix to what I need it to be?
-žarko