ID: Q105280
2.00 2.50 2.50a | 2.50 2.50a
MS-DOS          | WINDOWS
  kbui
It is sometimes desirable to allow the user to specify a title for a screen using variables or other hard-coded values. You can do this by using generator directives in the screen setup code, as described below.
1. Create or modify an existing screen.
2. From the Screen menu, choose Layout. In the Title box, type the
   variable for the title that will be passed into the screen. The
   syntax for the title is:
      ~ title1
   NOTE: A tilde (~) MUST be entered before the variable for the
   title.
   following code:
      #ITSEXPRESSION ~
      #SECTION1
      PARAMETER title1
      VARNAME=title1
5. Run the screen by entering the following code in a program or in
   the Command window:
      title1=' My special screen title '
      DO Screen1.spr WITH title1
If you have a memory variable (numeric) with a value of 1027, and you try either of these methods, you will get the literal string of the tilde and the memvar, not the substitution. To display the title properly, do the following:
1. In the Command window, type the following:
      USE tutorial\salesman
      CREATE SCREEN.
3. From the Screen menu, choose Layout. In the Name box, type "mytest"
   (without the quotation marks).
   following in the Setup Code box:
      mydate=1027
      modify window mytest title 'Title is '+alltrim(str(mydate))
1. Create or modify an existing screen.
2. From the Screen menu, choose Screen Layout, and select Window. In
   the Title box, enter the variable for the title that will be passed
   into the screen. The syntax for the title is:
      ~ title1
   NOTE: A tilde (~) MUST be entered before the variable for the
   title.
   window, type the following code:
      #ITSEXPRESSION ~
      #SECTION1
      PARAMETER title1
      VARNAME=title1
5. Run the screen by entering the following code in a program or in
   the Command window:
      title1=' My special screen title '
      DO Screen1.spr WITH title1
"Developer's Guide," (MS-DOS), versions 2.0 and 2.5, pages D2-31 to D2-32
"Developer's Guide," (Windows), version 2.5, pages D2-38 to D2-40
Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a
KBCategory:   kbui
Keywords          : kbcode FxenvMemory 
Version           : 2.00 2.50 2.50a | 2.50 2.50a
Platform          : MS-DOS WINDOWSLast Reviewed: May 22, 1998