Silverfrost Logo About Us | Contact Us

Centre - %cn

%cn forces the text and controls that follow (up to the next %nl or %ff) to be centred in the window (or box). It is often used in conjunction with buttons.

For example:

      INTEGER i,winio@
      i=winio@('%cn%si!Save current changes?%2nl&')
      i=winio@('%tt[Yes] %tt[No] %tt[Cancel]')

The %cn format code can take a grave accent format modifier. This causes centring to apply to the remainder of the format window or box. Thus a whole window or a box full of centred items may be created very easily.

For example:

    i=winio@('%`cnProgram to test prime numbers&')
    i=winio@('%2nlWritten by Joe Bloggs%2nl%`bt[OK]')

If %cn is used within a box then it centres objects within that box.



Copyright © 1999-2019 Silverfrost Limited