Reference Guide > T Routines > TmRect Procedure
  

TmRect Procedure
Adds a rectangle to a VDA Tool. The exact size and position of the rectangle is determined interactively by the user.
Usage
TmRect, tool_name
Parameters
tool_name—A string containing the unique name of a VDA Tool.
Keywords
None.
Discussion
TmRect is a graphical element (GRAEL) routine. GRAELs are predefined graphics routines used by VDA Tools. These routines allow you to add, configure, and remove graphical elements in the VDA Tool display area. The standard set of GRAELs includes axes, text, bitmaps, legends, lines, and rectangles. This standard set is accessible from the standard VDA Tool menu bar and button bar, which are provided by the VDA Utility routines WoMenuBar Function and WoButtonBar Function.
To create a rectangle, the user presses and drags MB1 to define the corners of the rectangle.
Example
The following example code is a callback routine for a menu bar. This callback executes TmRect in response to a menu selection.
PRO CreateBoxCB, wid, index
   tool_name = GetMenuBarToolName(wid)
   toggle_buttons = ['dataselect', 'graelselect', 'text', $
      'line', 'rectangle', 'legend']
   buttons_up = [0, 0, 0, 0, 0, 0]
   WoButtonBarSet, tool_name, toggle_buttons, buttons_up
   WoButtonBarSet, tool_name, 'rectangle', 1
   WoAddMessage, tool_name, 'MSG_RectCreate', /Clear
   WoAddStatus, tool_name, 'MSG_RectCreateStatus', $
      Item='STATUS2'
   TmRect, tool_name
END
See Also
TmAxis, TmBitmap, TmLegend, TmLine, TmText

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.