Silverfrost Logo About Us | Contact Us

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

%gp 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 format is used. Typically these values are used to position other windows over appropriate parts of a main window by using the %sp 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-2019 Silverfrost Limited