SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Getting started with the Ribbon Library
Peter Horsbøll Møller
March 2015
This will help you getting
started with the Ribbon
Library to develop MapBasic
applications for the new
ribbon based MapInfo Pro 64
bit.
Prerequisites:
Download and install:
- MapInfo Pro 12.5 64 bit
Get it >>>
- MapBasic 12.5.1
Get it >>>
Get the Ribbon Library
You can get the Ribbon Library from:
Github.com:
• https://github.com/PeterHorsbollMoller/mbRibbonExample
Community Download:
• http://communitydownloads.pbinsight.com/code-exchange/download/ribbon-
library-for-mapbasic
Unzip the Ribbon Library
Sample Application
Sample tables
Icons for the ribbon
Full source code
Running the RibbonExample
”How can I use the Ribbon Library in
my own MapBasic project?
Create a new file structure
Create a new base folder
Create a sub folder for your MapBasic source code
Base folder
Source code
Create a file structure
Copy the Library folder from the RibbonExample to your source code
folder
Base folder
Source code
Library
Use your preferred text editor to create a new Mapbasic source code file for
your application
Save it to the mbcode folder as type .mb, eg. MyFirstRibbonApp.mb
Insert these lines as a start:
Compile with MapBasic 12.5.1
Create a main source code file (.mb)
Include the RibbonLib header file
Include some MapBasic header files
Will show the new Notification
Use your text editor to create a new Mapbasic Project file for your application
Save it to the mbcode folder as type .mbp, eg. MyFirstRibbonApp.mbp
Insert these lines as a start:
Link with MapBasic 12.5.1
Create a MapBasic Project file (.mbp)
Name of final MapBasic application
Compiled libraries to be included
Your compiled module
Run the application in MapInfo Pro x64
Adding an EndHandler
To make sure your application tidy up after itself, add an
EndHandler to your application
Call the EndHandler of the RibbonLib
”How do I create a newTab and add
a Group to it?”
Add a newTab to the Ribbon
1. Check if theTab already exists
2. If not, add it
Adding the new Tab
Does it already exist?
Run the application in MapInfo Pro x64
1. Check if the Group already exists
2. If not, add it
Add a Group to theTab
Adding the new Group
Does it already exist?
Run the application in MapInfo Pro x64
How do I add a Button to my new
Group?
Adding a button to a group
First you add a new button to the group
Then you set the look and behaviour of the button, such as
caption, tooltips and icon
Modular level arrays
Adding a new button
Defining its look and
behaviour
Getting its Control ID for
later use
The handler of the button
This handler is designed to manage several buttons calling it
as it determines the ID of the button clicked by the user
Get the ID and calculate
the item number
Now do the work
Requires MAPPERLib
Adding the MAPPERLib module
Include the header file in your source code
And include the compiled module in your MapBasic project file
Include MAPPERLib.def
Include MAPPERLib.mbo
Run the application in MapInfo Pro x64
Adding multiple buttons
Add more elements to
the arrays
Loop the elements
Run the application in MapInfo Pro x64
What about splitbuttons?
Can I create these, too?
Add a SplitButton with a SplitButtonGroup
I’m adding a new SplitButton control
I’m setting the icon of the SplitButton to match the icons of the first button I’ll
add to it later
And I’m setting the handler of the SplitButton to match the handler of the
first button, too
Finally I add a SplitButtonGroup
Adding the SplitButton
Adding a SplitButtonGroup
Set icons
Set handler
Adding buttons to the SplitButtonGroup
And then we add the buttons to the SplitButtonGroup
This is similar to adding buttons to a Group on aTab
Adding the Buttons
Specify icons,
tooltips and
handlers
ControlID – needed in the handler
The handler/subprocedure
The the ID of the control
Did the user use the initial
button or did he select one
from the list?
Run the application in MapInfo Pro x64
”How can I easily add the
standard buttons to the
Tools window?”
Tool Manager – Addin procedures
Each tool can publish information
Sub
•AddIn_About
•AddIn_Help
•AddIn_DefaultCommand
Function
•AddIn_Name()
•AddIn_Description()
•AddIn_Version()
•AddIn_ImageUri()
Help File Aboutbox End
Description
Version
Image
Name
Default Command
activated thru
double click
The ProgramInfo module
These standard subprocedures and functions have been added to the
ProgramInfo module
Include the header file for this module in your application module
Include the ProgramInfo.def file
Configure the ProgramInfo module
Specify the values for ProgramInfo to use in the dialogs
You can use the functions from ProgramInfo to get to the values, such as the
application name via PRGIGetApplicationName()
Specifying values for
ProgramInfo
Use functions from ProgramInfo
to get to the values
Include compiled modules in your project
You need to include several extra compiled modules in the MapBasic
project file
Reading/writing configuration files
Managing files and folders
Working with map windows
Aboutbox and programinformation
Handling strings i different languages
Working with strings
Run the application in MapInfo Pro x64
”Can I use my own images
on the buttons?”
Using custom images
You can refer to internal MapInfo images, see the MapBasic User Guide, Glossary,
List of Embedded images for a list of all images
You can also refer to individual image files on disk, eg. in a sub folder of the
application directory
Internal MapInfo image
Image file on disk
Defines for Internal images
I have created defines for the internal images of MapInfo Pro 64 bit in a file
called MI_ICONS_X64.def.
The file is included in the source code for this sample application in the Library
folder and it will also be included with the RibbonLibrary SampleApplication
later.
”Are you sharing the source
code for this sample
application?”
Get the source code for the sample application
I have shared the source code on the Danish Pitney Bowes Software blog.
Get it here:
http://blogs.pitneybowes.dk/files/2015/03/MyFirstRibbonApp.zip
Have fun!
Questions?
Peter Horsbøll Møller | peter.moller@pb.com

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (10)

Nyheder i MapInfo Pro 12.5 Dansk 32 bit
Nyheder i MapInfo Pro 12.5 Dansk 32 bitNyheder i MapInfo Pro 12.5 Dansk 32 bit
Nyheder i MapInfo Pro 12.5 Dansk 32 bit
 
64 bits of MapInfo Pro - Danish version
64 bits of MapInfo Pro - Danish version64 bits of MapInfo Pro - Danish version
64 bits of MapInfo Pro - Danish version
 
MapInfo Pro 64 bit og MapInfo Pro Advanced 64 bit
MapInfo Pro 64 bit og MapInfo Pro Advanced 64 bitMapInfo Pro 64 bit og MapInfo Pro Advanced 64 bit
MapInfo Pro 64 bit og MapInfo Pro Advanced 64 bit
 
MapInfo Discover 2015.2 64 bit
MapInfo Discover 2015.2 64 bitMapInfo Discover 2015.2 64 bit
MapInfo Discover 2015.2 64 bit
 
MapInfo Pro og SQL Server - Uden opgaver
MapInfo Pro og SQL Server - Uden opgaverMapInfo Pro og SQL Server - Uden opgaver
MapInfo Pro og SQL Server - Uden opgaver
 
Using Spectrum on Demand from MapInfo Pro
Using Spectrum on Demand from MapInfo ProUsing Spectrum on Demand from MapInfo Pro
Using Spectrum on Demand from MapInfo Pro
 
MapInfo Discover 3D: From 2D to 3D
MapInfo Discover 3D: From 2D to 3DMapInfo Discover 3D: From 2D to 3D
MapInfo Discover 3D: From 2D to 3D
 
MapInfo Professional 12.0 and SQL Server 2008
MapInfo Professional 12.0 and SQL Server 2008MapInfo Professional 12.0 and SQL Server 2008
MapInfo Professional 12.0 and SQL Server 2008
 
Modul Map Info
Modul Map InfoModul Map Info
Modul Map Info
 
WMS, WFS og alle deres venner
WMS, WFS og alle deres vennerWMS, WFS og alle deres venner
WMS, WFS og alle deres venner
 

Mehr von Peter Horsbøll Møller

Mehr von Peter Horsbøll Møller (13)

MapInfo Pro v12.5 to v2021.1 Overview
MapInfo Pro v12.5 to v2021.1 OverviewMapInfo Pro v12.5 to v2021.1 Overview
MapInfo Pro v12.5 to v2021.1 Overview
 
MapInfo Pro Tips & Tricks med Geograf
MapInfo Pro Tips & Tricks med GeografMapInfo Pro Tips & Tricks med Geograf
MapInfo Pro Tips & Tricks med Geograf
 
Introduction to MapBasic
Introduction to MapBasicIntroduction to MapBasic
Introduction to MapBasic
 
Precisely MapInfo Pro v2019 and Roadmap
Precisely MapInfo Pro v2019 and RoadmapPrecisely MapInfo Pro v2019 and Roadmap
Precisely MapInfo Pro v2019 and Roadmap
 
Be Location Intelligent with MapInfo Pro v2019
Be Location Intelligent with MapInfo Pro v2019Be Location Intelligent with MapInfo Pro v2019
Be Location Intelligent with MapInfo Pro v2019
 
MapInfo Pro v2019: Improving the Way You Query
MapInfo Pro v2019: Improving the Way You QueryMapInfo Pro v2019: Improving the Way You Query
MapInfo Pro v2019: Improving the Way You Query
 
Eksklusivsmagning - 10 års jubilæum, Oksenvad Whiskylaug
Eksklusivsmagning - 10 års jubilæum, Oksenvad WhiskylaugEksklusivsmagning - 10 års jubilæum, Oksenvad Whiskylaug
Eksklusivsmagning - 10 års jubilæum, Oksenvad Whiskylaug
 
Llinking Spectrum dataflows to MapInfo Pro
Llinking Spectrum dataflows to MapInfo ProLlinking Spectrum dataflows to MapInfo Pro
Llinking Spectrum dataflows to MapInfo Pro
 
Clynelish - Oksenvad Whiskylaug
Clynelish - Oksenvad WhiskylaugClynelish - Oksenvad Whiskylaug
Clynelish - Oksenvad Whiskylaug
 
The Macallan - Oksenvad Whiskylaug
The Macallan - Oksenvad WhiskylaugThe Macallan - Oksenvad Whiskylaug
The Macallan - Oksenvad Whiskylaug
 
Advanced SQL Selects
Advanced SQL SelectsAdvanced SQL Selects
Advanced SQL Selects
 
Taking Advantage of a Spatial Database with MapInfo Professional
Taking Advantage of a Spatial Database with MapInfo ProfessionalTaking Advantage of a Spatial Database with MapInfo Professional
Taking Advantage of a Spatial Database with MapInfo Professional
 
The strength of a spatial database
The strength of a spatial databaseThe strength of a spatial database
The strength of a spatial database
 

Kürzlich hochgeladen

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Getting started with the ribbon library for MapBasic

  • 1. Getting started with the Ribbon Library Peter Horsbøll Møller March 2015
  • 2. This will help you getting started with the Ribbon Library to develop MapBasic applications for the new ribbon based MapInfo Pro 64 bit.
  • 3. Prerequisites: Download and install: - MapInfo Pro 12.5 64 bit Get it >>> - MapBasic 12.5.1 Get it >>>
  • 4. Get the Ribbon Library You can get the Ribbon Library from: Github.com: • https://github.com/PeterHorsbollMoller/mbRibbonExample Community Download: • http://communitydownloads.pbinsight.com/code-exchange/download/ribbon- library-for-mapbasic
  • 5. Unzip the Ribbon Library Sample Application Sample tables Icons for the ribbon Full source code
  • 7. ”How can I use the Ribbon Library in my own MapBasic project?
  • 8. Create a new file structure Create a new base folder Create a sub folder for your MapBasic source code Base folder Source code
  • 9. Create a file structure Copy the Library folder from the RibbonExample to your source code folder Base folder Source code Library
  • 10. Use your preferred text editor to create a new Mapbasic source code file for your application Save it to the mbcode folder as type .mb, eg. MyFirstRibbonApp.mb Insert these lines as a start: Compile with MapBasic 12.5.1 Create a main source code file (.mb) Include the RibbonLib header file Include some MapBasic header files Will show the new Notification
  • 11. Use your text editor to create a new Mapbasic Project file for your application Save it to the mbcode folder as type .mbp, eg. MyFirstRibbonApp.mbp Insert these lines as a start: Link with MapBasic 12.5.1 Create a MapBasic Project file (.mbp) Name of final MapBasic application Compiled libraries to be included Your compiled module
  • 12. Run the application in MapInfo Pro x64
  • 13. Adding an EndHandler To make sure your application tidy up after itself, add an EndHandler to your application Call the EndHandler of the RibbonLib
  • 14. ”How do I create a newTab and add a Group to it?”
  • 15. Add a newTab to the Ribbon 1. Check if theTab already exists 2. If not, add it Adding the new Tab Does it already exist?
  • 16. Run the application in MapInfo Pro x64
  • 17. 1. Check if the Group already exists 2. If not, add it Add a Group to theTab Adding the new Group Does it already exist?
  • 18. Run the application in MapInfo Pro x64
  • 19. How do I add a Button to my new Group?
  • 20. Adding a button to a group First you add a new button to the group Then you set the look and behaviour of the button, such as caption, tooltips and icon Modular level arrays Adding a new button Defining its look and behaviour Getting its Control ID for later use
  • 21. The handler of the button This handler is designed to manage several buttons calling it as it determines the ID of the button clicked by the user Get the ID and calculate the item number Now do the work Requires MAPPERLib
  • 22. Adding the MAPPERLib module Include the header file in your source code And include the compiled module in your MapBasic project file Include MAPPERLib.def Include MAPPERLib.mbo
  • 23. Run the application in MapInfo Pro x64
  • 24. Adding multiple buttons Add more elements to the arrays Loop the elements
  • 25. Run the application in MapInfo Pro x64
  • 26. What about splitbuttons? Can I create these, too?
  • 27. Add a SplitButton with a SplitButtonGroup I’m adding a new SplitButton control I’m setting the icon of the SplitButton to match the icons of the first button I’ll add to it later And I’m setting the handler of the SplitButton to match the handler of the first button, too Finally I add a SplitButtonGroup Adding the SplitButton Adding a SplitButtonGroup Set icons Set handler
  • 28. Adding buttons to the SplitButtonGroup And then we add the buttons to the SplitButtonGroup This is similar to adding buttons to a Group on aTab Adding the Buttons Specify icons, tooltips and handlers ControlID – needed in the handler
  • 29. The handler/subprocedure The the ID of the control Did the user use the initial button or did he select one from the list?
  • 30. Run the application in MapInfo Pro x64
  • 31. ”How can I easily add the standard buttons to the Tools window?”
  • 32. Tool Manager – Addin procedures Each tool can publish information Sub •AddIn_About •AddIn_Help •AddIn_DefaultCommand Function •AddIn_Name() •AddIn_Description() •AddIn_Version() •AddIn_ImageUri() Help File Aboutbox End Description Version Image Name Default Command activated thru double click
  • 33. The ProgramInfo module These standard subprocedures and functions have been added to the ProgramInfo module Include the header file for this module in your application module Include the ProgramInfo.def file
  • 34. Configure the ProgramInfo module Specify the values for ProgramInfo to use in the dialogs You can use the functions from ProgramInfo to get to the values, such as the application name via PRGIGetApplicationName() Specifying values for ProgramInfo Use functions from ProgramInfo to get to the values
  • 35. Include compiled modules in your project You need to include several extra compiled modules in the MapBasic project file Reading/writing configuration files Managing files and folders Working with map windows Aboutbox and programinformation Handling strings i different languages Working with strings
  • 36. Run the application in MapInfo Pro x64
  • 37. ”Can I use my own images on the buttons?”
  • 38. Using custom images You can refer to internal MapInfo images, see the MapBasic User Guide, Glossary, List of Embedded images for a list of all images You can also refer to individual image files on disk, eg. in a sub folder of the application directory Internal MapInfo image Image file on disk
  • 39. Defines for Internal images I have created defines for the internal images of MapInfo Pro 64 bit in a file called MI_ICONS_X64.def. The file is included in the source code for this sample application in the Library folder and it will also be included with the RibbonLibrary SampleApplication later.
  • 40. ”Are you sharing the source code for this sample application?”
  • 41. Get the source code for the sample application I have shared the source code on the Danish Pitney Bowes Software blog. Get it here: http://blogs.pitneybowes.dk/files/2015/03/MyFirstRibbonApp.zip Have fun!
  • 42. Questions? Peter Horsbøll Møller | peter.moller@pb.com