Create 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

Creates 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 group_to_create_before ] CONTEXT_TAB_GROUP_CLAUSE

window_id is a window identifier.

group_name is the name of the new group. It is a mandatory parameter.

group_to_create_before specifies the position/index of the group before which the new group would be created.

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

Description

The Create Ribbon Context Tab statement creates a 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 specifies the name of the new 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.

group_to_create_before is an optional parameter that specifies the position/index of the group before which the new group would be created. If this parameter is not specified or its value is more than the number of groups in the ribbon or its value is less than one, the new group is created at end position of the ribbon.

CONTEXT_TAB_GROUP_CLAUSE: This is a mandatory clause that sets the properties of the new group.
Create Ribbon 
	[ Window window_id ] Context Tab Group group_name
	[ Index group_to_create_before ]
	
	'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.