Adding Standard Controls to Ribbon with ribbonlib

79 views
Skip to first unread message

Harald Altendorfer

unread,
Mar 9, 2017, 5:01:19 AM3/9/17
to MapInfo-L
I am new to the Ribbon Interface of Mapinfo. However i have used Mapinfo and since Version 2.

My question:

Is it possible to add controls of other ribbons, especially M_TOOLS_SELECTOR to my cutsom ribbon strip.

I read through this forum and was enlighted pretty well, but did not figure out how to do that.

Thanks in advance!

Harald

Peter Horsbøll Møller

unread,
Mar 10, 2017, 4:05:40 AM3/10/17
to mapi...@googlegroups.com

Yes, that’s possible.

You basically add a button control as if you were adding a button that would call your custom procedure.

But instead of calling a MBX handler it will call a Command ID:

 

nCtrlIDx    = RBNGroupAddButton ("btnSelector", "Select", "", sTabName, sGroupName)

If nCtrlIDx > 0 Then

   Call RBNControlSetToolTipIdx(nCtrlIDx, "Selector", "Select features", "")

   Call RBNControlSetIconsIdx(nCtrlIDx, CONTROL_SIZE_LARGE, "", MI_IMG_MAP_SELECT_32)

   Call RBNControlSetCmdIDIdx (nCtrlIDx, M_TOOLS_SELECTOR)

End If

 

Where MI_IMG_MAP_SELECT_32 is a define from the MI_ICONS_X64.def:

Define MI_IMG_MAP_MARQUEESELECT_32                    "pack://application:,,,/MapInfo.StyleResources;component/Images/Mapping/marqueeSelect_32x32.png"

 

Peter Horsbøll Møller

Pitney Bowes

--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to
mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.




Harald Altendorfer

unread,
Mar 20, 2017, 3:00:53 AM3/20/17
to MapInfo-L
Thank you for response, was very helpful.

I found a little workaround, prior to your post, despite it is not really elegant. ;-)
I wrote an procedure and called e.g. "Run Menu Command M_TOOLS_SELECTOR" and then called the custom proecdure.

This group and especially you are very helpful.

Thanks again
Harald




Am Freitag, 10. März 2017 10:05:40 UTC+1 schrieb Peter Horsbøll Møller:

Yes, that’s possible.

...
Reply all
Reply to author
Forward
0 new messages