Get and set window position formats - %gp, %sp

In this section:

%gp (Window Postion) takes two integers as arguments. When the window is created these integers are set to the screen x, y co-ordinates of the point where the %gp (Window Postion) format is used. Typically these values are used to position other windows over appropriate parts of a main window by using the %sp (Window Position) format. It is also used for child windows. Each time the window is moved or re-sized the x, y pair is updated.

For example:

      INTEGER x,y,winio@
      COMMON x,y
      EXTERNAL myfunc
      i=winio@('Press this button to conceal it! &')
      INTEGER FUNCTION myfunc()
      INTEGER x,y,winio@
      COMMON x,y
c---  Window will be positioned relative to the button
c---  control in the main window



Copyright © 1999-2024 Silverfrost Limited