Mutliple documents mode: customize fly over text

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
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

Mutliple documents mode: customize fly over text

Post by edvschu »

Hello,

how can i customize fly over text on tab? I see there full file path. It's possible hide or change it?

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

Re: Mutliple documents mode: customize fly over text

Post by Sasha - Tracker Dev Team »

Hello edvchu,

Well, you can remove the tooltip by using this code:

Code: Select all

obj = doc.ActiveView.Obj;

IUIX_LayoutItem li;

while (obj != null)
{
   li = obj.LI;
   if (li != null)
     break;
   obj = obj.Parent;
}

if (li != null)
  li.Tooltip = ""; // remove tooltip
Though if any changes to the document will be made, the tooltip will load itself again.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

Re: Mutliple documents mode: customize fly over text

Post by edvschu »

It works. Thanks a lot.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Mutliple documents mode: customize fly over text

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

Re: Mutliple documents mode: customize fly over text

Post by edvschu »

The quick test, remove tooltip manually, has worked.

Now i have the following problem:
On start i handle remove tooltip on event viewingStarted. It works fine. Any changes to the document i handle in
event modStateChanged. It works not. When output a message before remove tooltip it works. What am I doing wrong?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Mutliple documents mode: customize fly over text

Post by Sasha - Tracker Dev Team »

Hello edvschu,

Well, the event that you are monitoring will launch only once - when the document was modified for the first time. Better latch the e.operExecuted event that is being called after each operation.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

Re: Mutliple documents mode: customize fly over text

Post by edvschu »

Hello Alex,

i changed it. Now the following occurs:

I add a stamp to the PDF. The tooltip is displayed. Then I move the stamp. The tooltip is no longer displayed.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Mutliple documents mode: customize fly over text

Post by Sasha - Tracker Dev Team »

Hello edvschu,

This is strange. Are you catching the operExecuted event after the stamp was added?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

Re: Mutliple documents mode: customize fly over text

Post by edvschu »

Yes, operExecuted event catched.

Do we mean the same? In FullDemo i register event operExecuted in InitIDS.
In pdfCtl_OnEvent catch operExecuted when stamp added and remove tooltip.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Mutliple documents mode: customize fly over text

Post by Sasha - Tracker Dev Team »

Hello edvschu,

Well in the pdfCtl_OnEvent the e.operExecuted should be caught and when it did then the code that removes the tooltip should be executed.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

Re: Mutliple documents mode: customize fly over text

Post by edvschu »

Okay. I did it that way. Code that removes the tooltip is running. But tooltip is displayed.
When output a message before remove tooltip it works.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Mutliple documents mode: customize fly over text

Post by Sasha - Tracker Dev Team »

Hello edvschu,

So you got it working then?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

Re: Mutliple documents mode: customize fly over text

Post by edvschu »

Nope. It doesn't work.

Although the code is executed after add stamp, tooltip is displayed.
Moving stamp code is executed also, but tooltip no longer displayed.

Can you confirm the behavior? Tested with version 6.0.322.5 in FullDemo project.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Mutliple documents mode: customize fly over text

Post by Sasha - Tracker Dev Team »

Hello edvschu,

I've confirmed this issue and even know why this happens and how to fix this.
The problem was in the first document's modification overall - does not matter what you do. The thing is that after the first modification the document's title is being updated (to draw an asterisk). Basically this also updates the cmd.save command. So what you can do is implement a custom command handler for the Save command and launch this code in the OnGetItemState method. That should work.
Here's a link to a sample I have:
https://gist.github.com/Polaringu/16bb2 ... 7cbe36f4e6

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

Re: Mutliple documents mode: customize fly over text

Post by edvschu »

Thats how it works. Thank you Alex.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Mutliple documents mode: customize fly over text

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply