Docs.CanOpenByDblClk - customize info message  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
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Docs.CanOpenByDblClk - customize info message

Post by zarkogajic »

Hi support,

How to alter the "Documents can be opened by double clicking here..." text which is displayed on an empty doc view area ?

I'm custom allowing documents to be drag-dropped - so would like to add that info also ....

This:

image.png
image.png (30.4 KiB) Viewed 2772 times
-žarko
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17910
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Docs.CanOpenByDblClk - customize info message

Post by Tracker Supp-Stefan »

Hello Zarko,

This string is translatable - so if you are running a custom localization (it it's a 'custom English' it could only have that string translated) - you can then load your custom translation to the Editor and it will show your custom string.

Regards,
Stefan
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: Docs.CanOpenByDblClk - customize info message

Post by zarkogajic »

Hi Stefan,

Thanks. Can this be done from code?

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

Re: Docs.CanOpenByDblClk - customize info message

Post by Sasha - Tracker Dev Team »

Hello žarko,

The ID of that string is DblClickToOpenDocsTip. The only way of modifying it here is going to the Resources.dat file opening it as a zip file, then going to the Misc folder and updating the Strings.xml file with the needed data.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: Docs.CanOpenByDblClk - customize info message

Post by zarkogajic »

Hi Alex,

Ok, thanks.

p.s.
I'm not a fan of that approach as with the new version of SDK/Resources - I would need to keep in mind to edit again...
So, will just leave it as is.

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17910
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Docs.CanOpenByDblClk - customize info message

Post by Tracker Supp-Stefan »

Hello Zarko,

Alternatively - you can do a custom 'translation' as I mentioned earlier - and have that loaded immediately after the Editor control.
Your "translation" file will effectively only have the strings you want updated - so it should be relatively small.
You can make a custom translation using this tool:
https://www.pdf-xchange.com/pdfxed ... zer301.zip

And then e.g. select any flavour of english that is not US (which is the embedded default), and then just supply that file with your project and load the translation from it immediately after the Editor SDK itself. That way even if the resources.dat updates - your translation should not need to.
I believe this is the method you need to call to set the localization to your own translation:
https://sdkhelp.pdf-xchange.com/vi ... rentUILang

Regards,
Stefan
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: Docs.CanOpenByDblClk - customize info message

Post by zarkogajic »

Hi Support,

What event should I catch in my custom IUIX_ObjImpl implementation for IPXV_DocumentViewsArea to *not* display the "DblClickToOpenDocsTip" message on it?


p.s.
I think Alex mentioned this possibility (when rendering or something like that) somewhere but I cannot find that post ...

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

Re: Docs.CanOpenByDblClk - customize info message

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

The drawing of that particular string is done in the e_Render event of the DocumentViewsArea object. If you overload that one and just return S_OK, it won't be drawn (as there is nothing else happening in that method).

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: Docs.CanOpenByDblClk - customize info message  SOLVED

Post by zarkogajic »

Hi Alex,

Great, yes, that was it, thanks!

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

Docs.CanOpenByDblClk - customize info message

Post by Sasha - Tracker Dev Team »

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