- You are here:
- Home
- CodeXchange
- All
- PowerBuilder
- RibbonBar Menu Generator
RibbonBar Menu Generator
- Bruce Armstrong
- Code Author
- Offline
Less
More
- Posts: 55
4 years 7 months ago - 1 month 2 weeks ago #272
by Bruce Armstrong
This message has an attachment file.
Bruce Armstrong created the code: RibbonBar Menu Generator
The attached utility allows you to select a target and will list the menus within the application. If you double click on a menu, the utility will generate sample XML for a RibbonBar that will contain app menu items and ribbon buttons corresponding to menu items in the selected menu.
In order to deal with inherited menus, the application adds the libraries from the selected target to it's own library list. Since that approach only works in an executable (not the development environment) you much compile the utility form the attached PBL and run the executable.
As written, the utility can only deal with targets whose libraries are in the same directory as the target or in sub-directories under the target directory. If your application uses targets whose PBLs are not in that structure, you will need to modify the of_gettarget method to better handle the parsing the library locations.
You can see it in operation in the following video: vimeo.com/407468290/81c471cd86
12/28/2020: The sample has been updated for 2019 R3.
10/14/24: If you can wait until PB 2025 comes out (in 2025), wait. The Export to RibbonBar XML option that is added in that version makes the utility obsolete:
docs.appeon.com/pb2025/pbug/Customizing_RibbonBar.html
In order to deal with inherited menus, the application adds the libraries from the selected target to it's own library list. Since that approach only works in an executable (not the development environment) you much compile the utility form the attached PBL and run the executable.
As written, the utility can only deal with targets whose libraries are in the same directory as the target or in sub-directories under the target directory. If your application uses targets whose PBLs are not in that structure, you will need to modify the of_gettarget method to better handle the parsing the library locations.
You can see it in operation in the following video: vimeo.com/407468290/81c471cd86
12/28/2020: The sample has been updated for 2019 R3.
10/14/24: If you can wait until PB 2025 comes out (in 2025), wait. The Export to RibbonBar XML option that is added in that version makes the utility obsolete:
docs.appeon.com/pb2025/pbug/Customizing_RibbonBar.html
This message has an attachment file.
Please log in or register to see it.
Last Edit: 1 month 2 weeks ago by Bruce Armstrong.
Please Log in or Create an account to join the conversation.
- Marcelo Gil
- Offline
Less
More
- Posts: 8
3 years 5 months ago #358
by Marcelo Gil
Marcelo Gil replied the code: RibbonBar Menu Generator
Hi Bruce, I am trying to run ribbonbarmenugenerator.exe but I am getting the following message: "Runtime path not exist, path c:\Program Files(x86)\Appeon\Common\PowerBuilder\Runtime 19.2.0.2556!". Can u help me ?
Please Log in or Create an account to join the conversation.
- Bruce Armstrong
- Code Author
- Offline
Less
More
- Posts: 55
3 years 7 months ago #347
by Bruce Armstrong
Bruce Armstrong replied the code: RibbonBar Menu Generator
Great! Glad you find it useful.
Please Log in or Create an account to join the conversation.
- Michael Hartnett
- Offline
Less
More
- Posts: 3
3 years 7 months ago #346
by Michael Hartnett
Michael Hartnett replied the code: RibbonBar Menu Generator
Thanks Bruce,
All sorted.
Love this, will be great utility to assist with converting from old to ribbon menus.
Michael
All sorted.
Love this, will be great utility to assist with converting from old to ribbon menus.
Michael
Please Log in or Create an account to join the conversation.
- Michael Hartnett
- Offline
Less
More
- Posts: 3
3 years 7 months ago #345
by Michael Hartnett
Michael Hartnett replied the code: RibbonBar Menu Generator
Sorry Bruce,
I don't see the script for the generator in the zip file.
I have modified the reference to the runtime folder in the XML file for the generator app and working now.
Michael
I don't see the script for the generator in the zip file.
I have modified the reference to the runtime folder in the XML file for the generator app and working now.
Michael
Please Log in or Create an account to join the conversation.
- Bruce Armstrong
- Code Author
- Offline
Less
More
- Posts: 55
3 years 7 months ago #344
by Bruce Armstrong
Bruce Armstrong replied the code: RibbonBar Menu Generator
I've provided you with the source code so that you can compile it yourself for whatever version you are using.
Please Log in or Create an account to join the conversation.
- Michael Hartnett
- Offline
Less
More
- Posts: 3
3 years 7 months ago #343
by Michael Hartnett
Michael Hartnett replied the code: RibbonBar Menu Generator
Hi Bruce,
Loved the presentation on this.
The runtime seems to be looking for PB Runtime 19.2.0.2556, but the current PB2019 R3 is actually Runtime 19.2.0.2670.
The application is throwing an error as a result.
Any chance you could provide and updated version.
Thanks
Michael
Loved the presentation on this.
The runtime seems to be looking for PB Runtime 19.2.0.2556, but the current PB2019 R3 is actually Runtime 19.2.0.2670.
The application is throwing an error as a result.
Any chance you could provide and updated version.
Thanks
Michael
Attachments:
Please Log in or Create an account to join the conversation.
Moderators: Appeon Administrator