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:

      WINAPP
      INTEGER x,y,winio@
      COMMON x,y
      EXTERNAL myfunc
      i=winio@('Press this button to conceal it! &')
      i=winio@('%gp&',x,y)
      i=winio@('%^bt[Press]',myfunc)
      END
c---
      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
      i=winio@('%spHidden!',x-5,y-5)
      myfunc=1
      END

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited