home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
wps
/
editor
/
epmtools
/
epmsmp
/
resize.e
< prev
next >
Wrap
Text File
|
1992-08-26
|
1KB
|
25 lines
; The following code can be included in MYMAIN.E to size the EPM window
; according to the largest file in the ring. There are two calls to
; windowsize1 included; the one that is used is the general one that
; will work from any window layout, since it queries whether or not the
; statusline, messageline and bottom scroll bar are visible and sets the
; window size accordingle. The other call (commented out) is more
; efficient, since it doesn't query the controls at runtime. Instead,
; it assumes the standard EPM setup of statusline on, messageline off,
; scroll bars on.
; Larry Margolis
getfileid startfid
biggest = 0
fid = ''
do while fid <> startfid
nextfile
biggest = max(biggest,.last)
getfileid fid
end
if biggest > 1 & biggest < 20 then
;; call windowsize1(biggest+1,.windowwidth,0,0,1) -- Size the window to the biggest file
call windowsize1(biggest-1 + querycontrol(7) + querycontrol(8) + querycontrol(10),
.windowwidth,0,0,1) -- Add 1 ea. for statusline, msgline, horiz. scrollbar
endif