Set Ribbon Context Tab Group statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Updates a MapInfo Pro ribbon contextual tab group. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Create Ribbon 
	[ Window window_id ] Context Tab Group { group_name | Index nIndex } 
	{ Remove | CONTEXT_TAB_GROUP_CLAUSE }

window_id is a window identifier.

group_name is the name of the new group.

nIndex specifies the position/index of the group.

CONTEXT_TAB_GROUP_CLAUSE, sets the caption, tool tip and other properties of the tab group.

Description

The Create Ribbon Context Tab statement updates MapInfo Pro ribbon contextual tabs and groups and other controls if specified.

If the window_id is specified, the window must be a map, browser, layout, or redistricter, and the window must have a ribbon.

The group_name is an optional parameter that specifies the name of the group. This is the variable name used in MapBasic scripts. It is a string expression and is case-sensitive. It must start with a letter or underscore and can contain numbers, letters, and underscores.

nIndex is an optional parameter that specifies the position/index of the group.

Remove the tab group from the ribbon.

CONTEXT_TAB_GROUP_CLAUSE: This is a optional clause that sets the properties of the new group.
Create Ribbon 
	[ Window window_id ] Context Tab Group { group_name | Index nIndex } 
	{ Remove | 
	
	'CONTEXT_TAB_GROUP_CLAUSE
	[ Caption caption ] [ Enable | Disable ] [ Hide | Show ] 
	[ Tooltip TOOTIP_CLAUSE ] [ Properties ( PROPERTIES_CLAUSE ) ] }
  • caption is the label/name of the group visible on the ribbon.
  • Enable or Disable the group upon creation.
  • Show or Hide the group upon creation.
  • TOOLTIP_CLAUSE sets the value of the new group's tool tip.
  • PROPERTIES_CLAUSE sets the properties of the group. See Ribbon Control Definitions for more details.
Note: Refer Ribbon Token and Property Mappings to see which ribbon token sets the corresponding ribbon property. You can access these properties using the RibbonInfo() and the RibbonItemInfo() functions.

Example

Please see the Create Ribbon Sample Code.