Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FreshWin (c) Fresh Technologies - <b>popup dialog pseudo-function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  POPUP DIALOG                                               Pseudo-Function
 Purpose..: Pop up a dialogue box
-------------------------------------------------------------------------------
 Syntax...: POPUP DIALOG                ;
                  [NOBORDERS]           ;
                  [TITLE   <cTitle>]    ;
                  [TCOLOR  <cTClr>]     ;
                  PROMPT   <cPrompt,...>;
                  [PCOLOR  <cPClr >]    ;
                  [HOTKEY  <nHot,...>]  ;
                  [HCOLOR  <cHClr,...>] ;
                  [SAYTEXT <cSay,...>]  ;
                  [SCOLOR  <cSClr>]     ;
                  [SHADOW  <nShad>]       ---> nPick

 Arguments: [NOBORDERS]   = choice not to frame the dialogue box.

            [<cTitle>]    = dialogue box title.

            <cPrompt,...> = one or more prompt strings set up in a comma
                            delimited format (comparable to a menu choice).
                            Each prompt should be enclosed in quotes.

            [<nHot,...>]  = one or more hot key position numbers
                            set up in comma delimited format. To decide
                            which position, start counting from one.

            [<cSay,...>]  = text to be centred in the dialogue box. Each
                            line is to be set up in a comma delimited string.
                            To have a blank line, send double quotes
                            ( "" ) between two commas.

            [<cTClr>]     = title color string.
            [<cPClr>]     = prompt color string.
            [<cSClr>]     = content text color string.
            [<cHClr>]     = hot key color string.

            [<nShad>]     = choice of shadow size. The default is S_FULL.

            Shadow Type Manifest Constants as found in FW_BOX.CH
            ---------------------------------------------------
            Value  FW_BOX.CH    Description
            ---------------------------------------------------
            1      S_FULL       Full size transparent shadows.
            2      S_HALF       Half size non-transparent shadows.
            ---------------------------------------------------

 Returns..: nPick is the value chosen via the dialogue box
            which can be used to execute an option.

 Source...: FW_MENU.CH
-------------------------------------------------------------------------------
 Example..: . The example displays a portion of a program
              which contains a dialogue box.

   POPUP DIALOG                                       ;
         NOBORDERS                                    ;
         TITLE   " Which Day Is It? "                 ;
         TCOLOR  "GR+/RB"                             ;
         PROMPT  " Monday  ", " Tuesday "             ;
         PCOLOR  "W+/RB, W+/B"                        ;
         HOTKEY  2, 2                                 ;
         HCOLOR  "W+/R, W+/R"                         ;
         SAYTEXT "", "If you pick the ",              ;
                 "Monday option the backdrop will ",  ;
                 "change.  The purpose is to remind ",;
                 "YOU that a backup should ",         ;
                 "be done...", ""                     ;
         SCOLOR  "W+/RB"                              ;
         TO      nChoice

   if nChoice == 1

      for n := 1 to wLength( "Dos" ) step 4
                   wPos( ,n  , 0 )
                wOut( ,replicate( "DO THE BACKUP  *  ",;
                       int( ( wWidth()+1 )/10 ) ) )

                   wPos( ,n+2, 0 )
                wOut( ,replicate( " *  TODAY'S MONDAY", ;
                      int( ( wWidth()+1 )/10 ) ) )
      next
   endif

 Note.....: The use of NOBORDER will create a dialogue box with
            shadowed prompts instead of boxed prompts. As well, the
            dialogue box will have no frame but rather will be displayed
            using the title style, WT_BAR. Further details can be found
            in the wFrame() entry.

            In addition to using the arrow keys, the Tab key
            is active for moving about.

See Also:

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson