![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS/AF Software: Class Dictionary |
This example creates a simple external file viewer that allows you to select the file to display and to change the font. In this application commands are issued from a pull-down menu.
| Name | FILEVIEW |
| Font | SAS Font |
| Scrollbars | Vertical is turned on. Horizontal is turned on |
Do not specify a file or fileref.
proc pmenu c=sasuser.menucat;
menu fileview;
item 'File' menu=file;
item 'View' menu=view;
item 'Help';
menu file;
item 'Open' selection=o;
item 'End';
selection o 'open';
menu view;
item 'Font' selection=f;
selection f 'font';
run;
quit;
SASUSER.MENUCAT.FILEVIEW.PMENU. Turn on Pmenu is always active.
| | length filename $ 200 fontlist 8 rc 8; INIT: filename = ''; fontlist = makelist(0, 'L') ; control allcmds ; return; |
| |
MAIN:
if ( _status_ = 'E' or _status_ = 'C') then
return; |
| | select(word(1, 'u')); |
| |
when ('OPEN');
rc = filedialog('OPEN',filename);
call notify('fileview','_set_file_',
filename, 'n'); |
| |
when ('FONT');
fontlist = fontsel(fontlist,' ' );
call notify('fileview', '_set_font_',
fontlist);
otherwise;
end; |
| | call nextcmd(); return; |
| | TERM: rc = dellist(fontlist); return; |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.