fgl_winsize()

fgl_winsize() takes as its argument a string which is the name of a window.  It returns two INTEGER values, which are the number of screen columns and the number of screen rows that the specified window covers.

The code sample shown opens three different windows in sequence.  The code then uses fgl_winmessage() to create a message box.  Within that box fgl_winsize() is used to display msg as its text.  That msg is configured to include the return values from fgl_winsize within it.  When you acknowledge one winsize message the next window and message are displayed

The first winsize message box looks like this:

Description: C:\Users\user\Desktop\Screenshots\winsize.jpg

MAIN

  OPEN WINDOW w_size1

    AT 1, 1

    WITH 24 ROWS, 80 COLUMNS

    ATTRIBUTE(GREEN)

      CALL report_winsize()

 

  OPEN WINDOW w_size2

    AT 3, 3

    WITH 20 ROWS, 76 COLUMNS

    ATTRIBUTE(BORDER)

      CALL report_winsize()

 

  OPEN WINDOW w_size3

    AT 5, 5

    WITH 16 ROWS, 72 COLUMNS

    ATTRIBUTE (WHITE, BORDER)

 

      CALL report_winsize()

 

END MAIN

 

FUNCTION report_winsize()

  DEFINE y, x INTEGER

  DEFINE msg CHAR(60)

  CALL fgl_winsize() RETURNING y, x

 

  LET msg = "Window w_size has ", x USING "<&", " columns, and ", y USING "<&", " rows"

  CALL fgl_winmessage("fgl_winsize()",msg,"info")

 

END FUNCTION

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.