Help needed with conversion to Ribbon UI  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
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Help needed with conversion to Ribbon UI

Post by prime clinical systems »

Hi this code works fine still in V8 to popup the cmd.document.signatures.placesign with classic mode, but throws error in ribbon mode, not sure how to find this now as I moved it to the Home Tab:

Dim cmdBar As PDFXEditCtl.IUIX_CmdBar
Dim nFlatIndex As Long
Dim cmdDoc As PDFXEditCtl.IUIX_CmdItem
Set cmdBar = Me.PDF.Inst.ActiveMainFrm.View.MenuBar
nFlatIndex = cmdBar.FlatFindFirstItemByCmdName("cmd.document") : this fails now

Set cmdDoc = cmdBar.FlatGetItem(nFlatIndex)
Dim cmdDocMenu As PDFXEditCtl.IUIX_CmdMenu
Set cmdDocMenu = cmdDoc.SubMenu
Dim nMenuIndex As Long
nMenuIndex = cmdDocMenu.FindFirstItemByCmdName("cmd.document.signatures.placesign")
Dim cmdSigSubMenu As PDFXEditCtl.IUIX_CmdMenu
If nMenuIndex = -1 Then
Exit Sub
End If
Set cmdSigSubMenu = cmdDocMenu.Item(nMenuIndex)
Dim IUIXobj As PDFXEditCtl.IUIX_Obj
Set IUIXobj = Me.PDF.Inst.ActiveMainView.Obj
Dim pPos As PDFXEditCtl.tagRECT
pPos.left = 200
pPos.bottom = 200
Call Me.p_uiInst.CmdManager.ShowPopupMenu(IUIXobj, cmdSigSubMenu, pPos)

Tried this but does not work:
Call Me.p_uiInst.CmdManager.ExecCmd(Me.PDF.Inst.Str2ID("cmd.document.signatures.placesign"))

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

Re: Help needed with conversion to Ribbon UI

Post by Sasha - Tracker Dev Team »

Hello prime clinical systems,

Try using the cmd.document.signatures.sign command.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Help needed with conversion to Ribbon UI

Post by prime clinical systems »

Hi Alex, this command is for placing a digital signature.. I want to call the Signatures and Initials popup, as before, just not sure where to start the search since the document menu does not exist in Ribbon UI. Thanks
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: Help needed with conversion to Ribbon UI  SOLVED

Post by prime clinical systems »

You can ignore this now, I solved by moving the signatures and initials to the main command bar, so no longer need to pop it up.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Help needed with conversion to Ribbon UI

Post by Sasha - Tracker Dev Team »

Hello prime clinical systems,

Glad you had it solved.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply