Locking CommandBars

PDF-XChange Viewer SDK
Simple DLL and ActiveX

Moderators: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Tracker Supp-Stefan

Post Reply
Parps
User
Posts: 70
Joined: Mon Sep 28, 2009 10:06 am

Locking CommandBars

Post by Parps » Fri Oct 26, 2012 4:32 pm

Hi Craig,

I have two questions to fine tune my PDF viewer:
  • With PXCVAX.ExecuteCommand('LockAllCmdBars') it is possible to toggle that the command bars are locked or not. But how can I find if the command are locked? I only want to execute the command when the command bars are not locked.
  • How can I make that after opening the document, the viewer area is selected? The users have the click in that area first, before scrolling action with the arrow keys or PageUp/Down are working.
Cheers,
Koen

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Locking CommandBars

Post by Tracker - Clarion Support » Fri Oct 26, 2012 5:41 pm

Hi Koen!

1. LockAllCmdBars simply means you cannot "customize" the command bars. It has nothing to do with functionality.

2. Try using Clarion's SETFOCUS() command on the OLE control holding the Viewer ActiveX.

HTH! :)
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Parps
User
Posts: 70
Joined: Mon Sep 28, 2009 10:06 am

Re: Locking CommandBars

Post by Parps » Sat Oct 27, 2012 1:00 pm

Hi Craig,
  • Probably you don’t even realize it can be done, but I found that it is possible to toggle the locking of the command bars. See the example. Now I would like to figure out if the command bars are locked, any ideas?
  • I tried the SetFocus api, but unfortunate that isn’t working. Maybe I was using it in the wrong way.
    However I found a work around. If you do for example PXCVAX.ExecuteCommand('FitPage') the ActiveX control is selected. The code must be the timer event because a delay of 1 second seems to be needed. Also in the example.
Cheers,
Koen
Attachments
pdfview_lock.zip
(7.09 KiB) Downloaded 189 times

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Locking CommandBars

Post by Tracker - Clarion Support » Sat Oct 27, 2012 3:26 pm

Hi Koen!

1. Not sure what you mean here. As described, "LockAllCmdBars simply means you cannot
'customize' the command bars. It has nothing to do with functionality."

2.
If you do for example PXCVAX.ExecuteCommand('FitPage') the ActiveX control is selected. The code must be the timer event because a delay of 1 second seems to be needed.
Good catch here. The delay is probably necessary to allow the Window and ActiveX to "settle."
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Parps
User
Posts: 70
Joined: Mon Sep 28, 2009 10:06 am

Re: Locking CommandBars

Post by Parps » Sun Oct 28, 2012 11:04 am

Hi Craig,
Tracker - Clarion Support wrote:1. Not sure what you mean here.
Try the example and you see what I mean :)

Cheers,
Koen

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Locking CommandBars

Post by Tracker - Clarion Support » Thu Nov 01, 2012 9:37 am

Hi Koen!

I will be looking at this one today.

I will also look at the ActiveX control Focus issue as well:

http://www.tracker-software.com/forum3/ ... 38&t=15867
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Parps
User
Posts: 70
Joined: Mon Sep 28, 2009 10:06 am

Re: Locking CommandBars

Post by Parps » Thu Nov 01, 2012 5:25 pm

Thanks. Today I installed the new version of my application. The users are happy with the new viewer. I use it also as a Print Preview window instead of the regular window. I really like this SDK. :D

Bye,
Koen

Tracker - Clarion Support
Site Admin
Posts: 1412
Joined: Wed Jun 30, 2004 4:45 pm
Location: Maryland, USA
Contact:

Re: Locking CommandBars

Post by Tracker - Clarion Support » Thu Nov 01, 2012 5:30 pm

Hi Koen!

So do I, actually! :)
Craig Ransom
Tracker Software - Clarion Support
http://www.tracker-software.com

Post Reply