MapInfo Pro Developers User Group

Expand all | Collapse all

Is there any documentation for the Mapbasic Ribbon Library?

  • 1.  Is there any documentation for the Mapbasic Ribbon Library?

    Posted 07-26-2018 09:46

    I'm working on a 64bit tool to add frequently used datasets and tools to the ribbon interface.

    I have got basic buttons working based on one of the examples but I would like to add some more advanced functionality, like toggle buttons, grouped buttons (if that's possible?), panels/galleries and maybe some drop down lists/settings.

    Looking at the RibbonLib source its difficult to see what is possible and what each function does.

    What would be awesome would be a few screenshots of the ribbon interface showing the different button/control types mapped to the Mapbasic functions required to build them.



  • 2.  RE: Is there any documentation for the Mapbasic Ribbon Library?

    Posted 07-26-2018 11:35

    Hi Brendan

    I guess you have found this article from @Peter Horsbøll Møller? https://li360.pitneybowes.com/s/article/Developer-Dojo-Using-a-MapBasic-library-to-integrate-tools-into-the-64-bit-MapInfo-Pro

    I guess you want/need more documentation though??



  • 3.  RE: Is there any documentation for the Mapbasic Ribbon Library?

    Posted 07-26-2018 12:00

    There's also the "ExtensibilityReferenceHelp.exe" application that should be in your MapBasic folder.



  • 4.  RE: Is there any documentation for the Mapbasic Ribbon Library?

    Posted 07-27-2018 05:01

    Thanks @John Ievers? , that was helpful. I didn't realise RibbonLib didn't cover all the control types. It seems if I want to do more then I'll have to go the .NET route.

    Thanks @James Nolet? , that's a useful resource if I end up going the .NET route.



  • 5.  RE: Is there any documentation for the Mapbasic Ribbon Library?

    Posted 07-27-2018 06:08
    Also checkout this document by Bill Wemple: http://communitydownloads.pbinsight.com/code-exchange/download/how-to-customize-new-ribbon-interface-with-mapbasic And yes, so far the RibbonLib doesn’t cover all the controltypes. It was meanly created to help MapBasic developers move their existing applications to the ribbon interface. And sorry that the documentation for the RibbonLib really is lousy - it’s mostly based on samples more that actual documentation


  • 6.  RE: Is there any documentation for the Mapbasic Ribbon Library?

    Pitney Bowes
    Posted 07-29-2018 10:37

    The Extensibility Ref help has a MapBasic Tab that provides the MapBasic method used for same interface if it can be supported by MapBasic. There are only a few that can't be used in MapBasic due to usage of .NET specific types\classes. There are multiple sample apps installed with MapBasic download for .NET and MapBasic controls.



  • 7.  RE: Is there any documentation for the Mapbasic Ribbon Library?

    Posted 07-30-2018 03:39

    Peter, included a couple of procedures in the Ribbonlib mb that shows what ribbon features can be added and what already exists in the standard MapInfo.

    Try looking at the RBNLoop and the RBNLoopCreateRibbonStatements, if you call these procedures they print out the various stages of creating most types of item.

    You can do most of the items you require through the Ribbonlib, although I haven't used galleries. For me it was certainly quicker using the Ribbonlib than going down the .Net route as at the time we didn't have much .Net experience.



  • 8.  RE: Is there any documentation for the Mapbasic Ribbon Library?

    Posted 07-31-2018 04:31

    Thanks @Peter Horsbøll Møller? and @Bill Wemple?, I now have some of the native MapBasic functions working. I think the problem was as all elements were created using RibbonLib so they had different IDs to the internal MI ones. Once I figured out how to expose and use the correct ID I managed to get the few missing pieces working.



  • 9.  RE: Is there any documentation for the Mapbasic Ribbon Library?

    Posted 07-31-2018 04:37

    Thanks @David Wilson? , yeah I spotted that function in one of the sample tools Peter released which printed out the commands to a txt file.The problem was it converts the particular type of button I wanted to just a regular button.

    Yes, I agree RibbonLib saves a lot of time. I'm hoping to release this tool soon, inspired by the tool you guys demo'd at the MUGUK event. The idea is to allow anyone to build a simple tab/button based interface with no MapBasic knowledge required - just edit a spreadsheet to add buttons.



  • 10.  RE: Is there any documentation for the Mapbasic Ribbon Library?

    Posted 07-31-2018 04:38
    Yeah, The ID you get when you create a control via the RibbonLib is an internal index reference that can be used in other RibbonLib functions but you can’t use this directly. The RibbonLib also has a function that will return the Ribbon Control ID which can be used to reference the control directly


  • 11.  RE: Is there any documentation for the Mapbasic Ribbon Library?

    Posted 08-01-2018 04:45
    PS: Brendan, as I have said to other developers using the RibbonLib, do let me know if you are looking for specific features/functions in the RibbonLib. I’m always willing to improve the library.