Chapter Contents

Previous

Next
Text Viewer: _setFont

Text Viewer: _setFont



Assigns a font for the text displayed in the viewer


Syntax
Details
Example

Syntax

CALL NOTIFY (viewer-name, '_setFont', font-list-id);

Argument Type Description
font-list-id
N specifies the identifier of an SCL list created by the FONTSEL function in SCL and containing font information


Details

The value passed to the _setFont method may come from the value of a font selector widget, or from a _getFont method call on a widget which uses a font list (such as the text viewer itself).


Example

In this example the frame contains a text viewer (TEXTVIEW), a push button (PB), and a font selector widget (FONTSEL). When the user clicks on the push button, the text viewer uses the font currently displayed by the font selector widget.

init:
   fontl = makelist();
   call notify('fontsel', '_set_font_',
                fontl);
return;

pb:
      /* retrieve the font displayed in the
         font selector widget */
   call notify('fontsel', '_get_font_',
                fontl);

       /* assign the font to the
          text viewer */
  call notify('textview', '_set_font_',
               fontl);
return;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.