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>wsay() window function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  WSAY()                                                     Window Function
 Purpose..: Position and format some text in a window
-------------------------------------------------------------------------------
 Syntax...: wSay( [<uWin>], [<nRow>], [<nCol>],
                   <cTxt>[, <cClr>[, <cChar>]] ) --> lResult

 Arguments: [<uWin>]  = window identifier. The default is to
                        operate on the window in focus.
 Arguments: [<uWin>] = the string identifier of the window
                       OR the reference to the window structure
                       returned as an array by wNew() or wArray().
                       If not passed, the function will operate on
                       the window in focus.

            [<nRow>] = relative row to start text.
            [<nCol>] = relative column to start text.

            <cTxt>   = window text to be displayed.
            [<cClr>] = color to be used for the text.
            [<cChar>]= text parsing character.

 Returns..: lResult is TRUE, if successful.

 Remark...: wSay() takes the text and displays it in the window
            until it runs out of text or space. The parsing character
            can be used for a line feed. The default character is a
            tilde, "~".

            You should remember that wSay() will not write text to
            the right-most column inside a window. However, wSay() seeks
            a blank in the string to be written and wraps around at
            that point. This prevents wierd word splitting. Worthy of
            mention also is that "word wrapped" text cannot be
            scrolled interactively. To create scrollable text, you can
            use wView() with a delimited string or a single dimension
            array or a text file.

            If you don't need the color or parsing character,
            an alternative to wSay() is wPos() and wOut().

            The function works whether the window is open or not.

 Source...: WSAY.PRG
-------------------------------------------------------------------------------
 Example..: . The example displays the text in the window
              in focus on the first row (i.e. row 0) starting in the
              second column. Notice the tilde.

        wSay ( , , 2, "Okay... Let's Move it~ around with arrow keys..." )

            . The example displays text in a window but
              the color is changed.

        wSay ( , 2, 2, "Let's look at that syntax again....", "B+/W*" )

            . This example uses the C line feed character to
              delimit text strings.

        wSay( ,1,1,"Use/nC-Like/nLineFeed/nCharacters",,"/n" )

              As with all FreshWin window functions that alter the display,
              this function hides and redisplays automatically the mouse
              cursor if it is active.

See Also: wClear() wView() wOut() wPos()

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