ui.Window.displayAt()

 

variable.DisplayAt("message", y, x [, attributes])

 

This method is used with a variable of the WINDOW data type and displays a text to a definite location in the window specified by the variable. If this window wasn't the current one, it is made the current window. To be able to use this method, you should first initialize the WINDOW variable with the help of the Open() or ForName() methods:

 

CALL win_var.DisplayAt("The message to display", 2, 5, "red, bold")

 

This method accepts four arguments. The first argument is a quoted string or a variable of a character data type which is to be displayed to the window. Y stands for the row and x for the column at which the message will be displayed, these are both literal integers or integer variables. The attributes argument is a quoted string containing the standard display attributes of colour and intensity. It is optional.

There may be more than one attribute in the character string, and then they should be separated by commas. Here are the attributes you can use:

·         Black, white, yellow, green, magenta, red, blue, cyan

·         Invisible, underline, reverse, blink

·         Normal, dim, bold

 

Example program:

 

MAIN

        DEFINE win ui.Window

        OPEN WINDOW w WITH 20 ROWS, 40 COLUMNS attribute (border)

        LET win = ui.Window.ForName("w")

        MENU

                ON ACTION "display"

                        CALL win.DisplayAt("The message to display", 5, 5, "red, bold")

                ON ACTION 'Exit'

                        EXIT MENU

        END MENU

END MAIN