Reference Guide > W Routines > WoGetUniqueWindowTitle Function
  

WoGetUniqueWindowTitle Function
Given two descriptive strings, generates a unique window title for a VDA Tool.
Given a window title, adds a numeric suffix to make the title unique.
Usage
name = WoGetUniqueWindowTitle(primary, secondary)
Input Parameters
primary — A string specifying the primary component of the window title, typically a PV‑WAVE variable name.
secondary — A string specifying the secondary component. Typically the VDA Tool name, appears after a hyphen (–).
Returned Value
name — A string containing a unique name for the window.
Keywords
None.
Discussion
If the window “MyImage – Image” already exists, this routine returns “MyImage – Image – (1)”.
Example
The following procedure creates and sets the title of a VDA Tool.
PRO WzToolNameSetTitle, tool_name
   DECLARE FUNC, TmEnumerateVars
   ; Get the description of this tool, i.e. 'Surface Tool'.
   tool_title = TmGetMessage('WzToolName_title')
   ; Get the variable name(s).
   var_names = TmEnumerateVars(tool_name)
   IF N_ELEMENTS(var_names) EQ 1 THEN vars = var_names(0) $
      ELSE vars = STRJOIN(var_names, ',')
   ; Create the window title and set it.
   window_title = WoGetUniqueWindowTitle(vars, tool_title)
   WoSetWindowTitle, tool_name, window_title
END
See Also
WoSetWindowTitle

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