Page 1 of 1

Docs.CanOpenByDblClk - customize info message

Posted: Mon Jan 20, 2020 4:23 pm
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
-žarko

Re: Docs.CanOpenByDblClk - customize info message

Posted: Mon Jan 20, 2020 4:41 pm
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

Re: Docs.CanOpenByDblClk - customize info message

Posted: Mon Jan 20, 2020 7:02 pm
by zarkogajic
Hi Stefan,

Thanks. Can this be done from code?


Re: Docs.CanOpenByDblClk - customize info message

Posted: Tue Jan 21, 2020 4:02 pm
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

Re: Docs.CanOpenByDblClk - customize info message

Posted: Tue Jan 21, 2020 4:12 pm
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.


Re: Docs.CanOpenByDblClk - customize info message

Posted: Tue Jan 21, 2020 4:18 pm
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

Re: Docs.CanOpenByDblClk - customize info message

Posted: Wed May 06, 2020 1:09 pm
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

Re: Docs.CanOpenByDblClk - customize info message

Posted: Wed May 06, 2020 2:34 pm
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

Re: Docs.CanOpenByDblClk - customize info message  SOLVED

Posted: Wed May 06, 2020 3:39 pm
by zarkogajic
Hi Alex,

Great, yes, that was it, thanks!

-žarko

Docs.CanOpenByDblClk - customize info message

Posted: Thu May 07, 2020 6:38 am
by Sasha - Tracker Dev Team
:)