Property sheet - %Nps

In this section:

Property sheets represent a way of presenting two or more 'sheets' of data in a form that resembles a card index. Each sheet is set up as a separate window using %sh (Property Sheet). %sh produces a child window that is hidden from view until connected to a property sheet control using %ps (Property Sheet Container). The property sheet can also have a call-back function that is called each time the visible sheet is changed. A SHEET_NO parameter is provided (see CLEARWIN_INFO@) so that it is possible to determine the sheet that is topmost. When the sheet is first displayed, the SHEET_NO is set to 1 and the call-back is also called. A grave accent modifier is supplied to %ps in order provide a control variable. This variable is used set the initial sheet (at a value other than one which is the default) and to change the sheet number under program (rather than user) control (see %ps (Property Sheet Container) for further details). The control variable must be given the SAVE attribute or be a global variable (e.g. stored in a module or common block).

If %ca (Caption) is used to provide a caption for the property sheet, then the character '&' will have the effect of generating an accelerator key (this will only work for the %ps format).

If an individual sheet is closed (e.g. by placing a button without a callback function in the sheet) then the parent window will close.

      WINAPP
      INTEGER h1,h2,i,winio@
      CHARACTER*120 notes
      CHARACTER*20  name,telephone
      notes=' '
      name=' '
      telephone=' '
c--First property sheet
      i=winio@('%sh&',h1)
      i=winio@('%fn[MS Sans Serif]%ts&',0.90D0)
      i=winio@('%ca[&Telephone]%dy&',0.6D0)
      i=winio@('%2.2ob[no_border]&')
      i=winio@('Name:%cb&')
      i=winio@('%12rs%cb&',name)
      i=winio@('Telephone: %cb&')
      i=winio@('%12rs%cb',telephone)
c--Second property sheet
      i=winio@('%sh&',h2)
      i=winio@('%ca[&Notes]&')
      i=winio@('%fn[MS Sans Serif]%ts&',0.90D0)
      i=winio@('%20.3re',notes)
c---Display the combined sheets
      i=winio@('%ca[Property sheet]%bg[grey]&')
      i=winio@('%2ps',h1,h2)
      END

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited