TmGetTop Function

Gets the top-level widget ID for a VDA Tool.

Usage

top = TmGetTop(tool_name)

Parameters

tool_name—A string containing the unique name of a VDA Tool.

Returned Value

top—(long) The top-level widget ID for the VDA Tool.

Keywords

None.

Discussion

TmGetTop is used to obtain the widget ID of the top-level VDA Tool widget. This function is called when you exit a VDA Tool, unregister a VDA Tool, and create a dialog box (dialog boxes are children of the top-level VDA Tool widget).

Example

This example shows how the top-level widget ID is used to create a dialog box. The dialog box is actually a child of the top-level VDA Tool widget.

; Get the top-level widget ID.
parent = TmGetTop(tool_name)
; Get message text from the string resource file.
title = TmGetMessage('wzplot.ads','data_export_title') $
   + ' ' + tool_name
; Create dialog box using top-level widget ID from TmGetTop.
dialog = WoGenericDialog(parent, layout, $
   'WzPlotDataExportCB', Dialog_name = 'exportDataDialog', $
   Buttons=buttons, Title=title, $
   Help=['Export Selected Data Dialog Box', helpfile], $
   /Ok, /Apply, /Cancel)

See Also

TmEnumerateToolNames, TmGetMessage, TmGetUniqueToolName,
TmInit, TmRegister, TmUnregister