Properties Toolbar questions

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Properties Toolbar questions

Post by TatianaS »

Hello,
I am wandering if there is a way to show Annotation properties on the toolbar when annotation is selected or/and double clicked.
Right now I am using SetProperty('View.Bars["Properties"].Visible', '1', 0) however, I do not what property of the document to be shown because users can change security of the document that way.

My questions are:
1. Is is possible to just disable Properties Toolbar, but still have it visible is some situations
2. Is it possible to disable 'Lock' annotation button in advanced drop-down annotation properties

Thanks
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: Properties Toolbar questions

Post by Stefan - PDF-XChange »

Hi TatianaS,

Please check the "how to disable a command" section of the Viewer AX SDK manual.

It should be possible to hide the properties toolbar, and then when an annotation is selected to re-enable and show the properties toolbar, but you want to hide/disable the "Document Properties" in particular. For this simply disable the "Document Properties..." command (ID 33270)

For your second point try disabling ToggleAnnotLockState (ID 36001) and Locked (ID36461).
Alternatively you can deactivate the the whole "Properties..." entry in the context menu (ID 33116).

Regards,
Stefan
TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Re: Properties Toolbar questions

Post by TatianaS »

The command: 33270 work perfectly, thank you.

However disabling 'Locked' menu in the annotation properties window did not work with ID 36001 and Locked 36461
or 33116.

My code:
SetProperty('Commands[#36001].State', 'Offline', 0);
SetProperty('Commands[#36461].State', 'Offline', 0);
or
SetProperty('Commands[#33116].State', 'Offline', 0);

Thanks,
-Tatiana
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Properties Toolbar questions

Post by Vasyl - PDF-XChange »

Hi Tatiana.

You are right, currently is impossible to disable these commands in this menu. This issue will be fixed in the next build. Please wait.

Best
Regards.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Re: Properties Toolbar questions

Post by TatianaS »

Thanks,
I have another question:
When I click on any annotation button, I can see the Annotation Toolbar (with color settings, etc.)
Then I click on my own button, but the Annotation Toolbar is still visible.
Is there a way to reset active tool to be inactive?

Thanks,
-Tatiana
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: Properties Toolbar questions

Post by Stefan - PDF-XChange »

Hello Tatiana,

You say "Then I click on my own button" - is this a button outside of our AX control?

Regards,
Stefan
TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Re: Properties Toolbar questions

Post by TatianaS »

Yes it is, it is on my own toolbar
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: Properties Toolbar questions

Post by Stefan - PDF-XChange »

Thanks TatianaS,

So on our AX control losing focus or on your users clicking your button you might set the active tool to e.g. the hand one:

Code: Select all

SetProperty("Tools.Active", "Hand");
and this should make the properties toolbar shrink as there are no active properties for the hand tool, or if you want you can at that point directly hide the toolbar

Code: Select all

SetProperty("View.Bars["Properties"].Visible", DataIn(0), 0);
Regards,
Stefan
TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Re: Properties Toolbar questions

Post by TatianaS »

Thanks, the command SetProperty("Tools.Active", "Hand") fixes the annotation tool bar only if no annotation is selected

Scenario:
1. Select any existing Annotation object on a document
2. Click on my button (in my Toolbar) which reset the active tool to hand

Result: the Annotation object is still selected which cause the Annotation bar still to be showing.

I think that besides setting active too to "Hand" I need to deselect annotation or simulate clicking on page which will deselect annotation

Thanks,
-Tatiana
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Properties Toolbar questions

Post by Vasyl - PDF-XChange »

Hi, Tatiana

Try please:

Code: Select all

DoDocumentVerb(docID, "Flush", stub, null, 0); // it may deselect the annot
SetProperty("Tools.Active", "Hand");
HTH
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Re: Properties Toolbar questions

Post by TatianaS »

That worked! Thanks
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm

Re: Properties Toolbar questions

Post by Will - Tracker Supp »

:)
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com