Thanks so much
@Bob Fortin and
@William Wemple, this sample really helped me.
I've created a tool which I hope many MapInfo users will find useful. This tool provides an enhancement which I've wanted to see in MapInfo for many years (there are a couple of posts about this feature in the Ideas Portal).
The tool allows users to quickly update the border for all polygons styles for range and individual thematics. For example, the tool allows the user to quickly turn off all borders (something I often want to do) or change all borders to a different line style (e.g. light grey).
------------------------------
Kalu Ribush
Dept. Jobs, Precincts & Regions (VIC)
Melbourne VIC
------------------------------
Original Message:
Sent: 12-08-2020 14:44
From: Bob Fortin
Subject: Add button to Theme Context ribbon tab
Hi Kalu,
@William Wemple created this sample for you.
-Bob
------------------------------
Bob Fortin
Software Architect and Distinguished Engineer
MapInfo Pro Development Team
Original Message:
Sent: 12-08-2020 00:49
From: Kalu Ribush
Subject: Add button to Theme Context ribbon tab
Thanks Bob for your reply.
I had a go at this, but my programming skills don't extend much beyond MapBasic. I'm trying to make the leap to extending with python, but it's not yet familiar to me.
Can anyone show me how to incorporate this into my tool (attached in original post).
Many thanks.
------------------------------
Kalu Ribush
Dept. Jobs, Precincts & Regions (VIC)
Melbourne VIC
Original Message:
Sent: 12-01-2020 11:39
From: Bob Fortin
Subject: Add button to Theme Context ribbon tab
Hi Kalu,
Here is how to do it via Python. The .net code is very similar.
from MapInfo.Types import ControlTypebutton = pro.Ribbon.ContextualTabGroups['LayerTools'].Tabs['TabTheme'].Groups['CustomizeStyleBar'].Controls.Add('Button1','Button', ControlType.Button)button.CommandId = 102
The main point is that the contextual tabs are in a different collection.
For MapBasic you would need to use GetCntxtTabGrpsColl().
-Bob
ps. I tried via alter buttonpad also but that currently does not support contextual tabs. I will create a backlog item for that.
------------------------------
Bob Fortin
Software Architect and Distinguished Engineer
MapInfo Pro Development Team
Original Message:
Sent: 11-30-2020 17:00
From: Kalu Ribush
Subject: Add button to Theme Context ribbon tab
Hi all.
I'd like to add a button to the THEME context ribbon tab using MapBasic. Can anyone help me with the correct syntax? It could just be a simple button, but I would also like to try adding a split button.
I've written a tool to do a bulk change of the border (pen) for all the range or individual theme styles. For example, if I want to remove the border for multiple theme classes in one click. I've attached an example of my tool where the control is in the right-click context menu for the layer in Explorer, but I'd like to add the control to the ribbon tab.
------------------------------
Kalu Ribush
Dept. Jobs, Precincts & Regions (VIC)
Melbourne VIC
------------------------------