Set Ribbon clauses - 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

CONTROL_CLAUSE

Syntax 1

Control { [ name | Index nIndex] Remove
Syntax 2
[ Add ] Control { [ name | Index nIndex] | Index control_to_Create_Before } 
	[ Type controlType ][ Caption caption ] [ Show | Hide ] [ Enable | Disable ] 
	[ Tooltip TOOLTIP_CLAUSE ] [ Largeicon ICON_CLAUSE ] [ Smallicon ICON_CLAUSE ] 
	[ Size large | small | extrasmall ]  [ Properties ( PROPERTIES_CLAUSE ) ]
  • name of the control in the group.
  • nIndex specifies the position/index of the control in the group.
  • Remove the control.
  • Add: Use the Add clause to check if the group already exists.
  • control_to_Create_Before specifies the position/index of the control before which the new control would be created in the group.
  • controlType specifies the type of control. It can have a numeric or string value. For details and examples, see the CreateRibbon.mb file at <mapbasic_install_directory>\SAMPLES\MAPBASIC\CreateRibbon.
  • caption is the label/name of the control visible in the group.
  • Show or Hide the control.
  • Enable or Disable the control.
  • TOOLTIP_CLAUSE sets the value of the new control's tool tip.
  • ICON_CLAUSE specifies the icon for the control.
  • large, small, and extrasmall determines the size of the control in the group.
  • PROPERTIES_CLAUSE sets the properties of the tab as defined in the RibbonControls.def file.

LAUNCHER_CLAUSE

Launcher [ Show ] [ Hide ] calling CALLING_CLAUSE [ Tooltip TOOLTIP_CLAUSE ]
  • Show the launcher.
  • Hide the launcher.
  • CALLING_CLAUSE calls the specified method, command or function.
  • TOOLTIP_CLAUSE sets the value of the launcher's tool tip.

TOOLTIP_CLAUSE

{ Remove | { tooltiptext | ( PROPERTIES_CLAUSE ) } }
  • Remove the tool tip.
  • tooltiptext sets the value of the tool tip.
  • PROPERTIES_CLAUSE sets the properties of the tab as defined in the RibbonControls.def file.

PROPERTIES_CLAUSE

The Properties_Clause uses the properties defined in the RibbonControls.def file and sets them for a tab, group, contextual tab or a control.

'PROPERTY_DEFINITION [, PROPERTY_DEFINITION... ] 
'PROPERTY_DEFINITION:
property_name : property_expression [, property_name : property_expression... ]
  • property_name specisfies the name of the property
  • property_expression specifies the corresponding expression.

ICON_CLAUSE

{ ID legacy_id [ File file_spec ] | uri_string
  • legacy_id is the legacy MapInfo Pro icon ID.
  • file_spec is the path to a file containing the icon.
  • uri_string is the path to a resource containing the icon.

CALLING_CLAUSE

{ Procedure | menu_id | OLE method_name | DDE appl_name, topic_name }
  • Procedure to be called when you click on the launcher.
  • menu_id specifies the code for a standard menu command (for example, M_FILE_NEW) to be opened when you click on the launcher.
  • method_name specifies the OLE method or function to be called when you lick on the launcher.
  • appl_name is a string representing an application name (for example, "MapInfo").
  • topic_name is a string representing a topic name (for example, "System").