Copy existing SoftPro button to another group in the ribbon

Discussions concerning general integration topics.

Moderator: Phil Barton

Post Reply
chris.brady
Posts: 105
Joined: Wed Oct 17, 2012 4:20 pm

Copy existing SoftPro button to another group in the ribbon

Post by chris.brady »

We're looking to group together different buttons/functions based on purpose or area. Is there a way to copy an existing button (such as New Order, Apply Template, etc.) into a custom group? Would it be a matter of adding a button to our command table file and calling an existing method to execute the button's code?

If you can point me in the right direction, I'd appreciate it.

FYI, attachment upload functionality isn't working. I tried adding a screenshot to this post, but got this error:
"Could not upload attachment to ./files/174_ebcd360f0706ab7734901474063aa1b5."
neetab
Posts: 22
Joined: Wed Apr 17, 2013 3:20 pm

Re: Copy existing SoftPro button to another group in the rib

Post by neetab »

Yes, you are right, you need to add the button to the existing group in the .ctd file. For example, I have 3 buttons under Group "RibbonChunkItemsGroup1"

<MenuRef id="pfm:ProFormTab">
<Group id="RibbonTabGroup1" priority="100">
<Menu id="RibbonTab1" text="Web Order Entry">
<Group id="RibbonChunkItemsGroup1" style="Vertical">
<Button id="FileCommand" largeImage="Resources\Import_16x16.png"
smallImage="Resources\Import_16x16.png" priority="10" text="Import File"
toolTip="Click here to import a single file." />
<Button id="FolderCommand" largeImage="Resources\Import_16x16.png"
smallImage="Resources\Import_16x16.png" priority="10" text="Import Folder"
toolTip="Click here to import a folder of files." />
<Button id="OrderCommand" largeImage="Resources\Import_16x16.png"
smallImage="Resources\Import_16x16.png" priority="10" text="Import Into Order"
toolTip="Click here to import a file into the current order." />
</Group>
</Menu>
</Group>
</MenuRef>
chris.brady
Posts: 105
Joined: Wed Oct 17, 2012 4:20 pm

Re: Copy existing SoftPro button to another group in the rib

Post by chris.brady »

I'm sorry, I don't quite see how that explains how to duplicate the functionality of a pre-existing SoftPro Button. I'm familiar enough with how to add a custom button. What I'm asking is how to create a button that will do the exact same thing as one of the default SoftPro buttons.
neetab
Posts: 22
Joined: Wed Apr 17, 2013 3:20 pm

Re: Copy existing SoftPro button to another group in the rib

Post by neetab »

sorry, I did not read your question properly,

Since you are using an existing SoftPro button, you can just add the existing button to another group in the ctd file.
chris.brady
Posts: 105
Joined: Wed Oct 17, 2012 4:20 pm

Re: Copy existing SoftPro button to another group in the rib

Post by chris.brady »

I'm not using an existing SoftPro button. That's what I'm trying to accomplish. I guess the proper question is "How do I add a default SoftPro button to our custom group", but I thought I'd already been clear about that.
neetab
Posts: 22
Joined: Wed Apr 17, 2013 3:20 pm

Re: Copy existing SoftPro button to another group in the rib

Post by neetab »

I checked the existing ctd file for the Proform tab, none of the buttons New Order, Apply Template etc under Proform tab have export="true" on them, so they are not accessible in your custom package. So you will not be able to duplicate its functionality.

There are buttons in other tabs that have export=true which you can access via your custom package.

You can look at the cts file which is under Select SDK/Include which has all the Menus, buttons, groups you can access using MenuRef, ButtonRef or GroupRef respectively. Hope this helps.
Post Reply