I.e.: When a datawindow is in Print Preview mode, is there a way to
query it to find out what the physical page width is, so that I can then
set the print preview zoom so that the page just fits in the window?
THANKS!!
--
Tom Hansen
to...@execpc.NOSPAMcom
http://www.execpc.com/tomh
boolean lb_shrink
setpointer(hourglass!)
dw_report.setredraw(false)
if dw_report.object.datawindow.horizontalscrollmaximum <> "0" then lb_shrink
= TRUE
if lb_shrink then
Do Until dw_report.object.datawindow.horizontalscrollmaximum = "0"
dw_report.object.datawindow.print.preview.zoom =
integer(dw_report.object.datawindow.print.preview.zoom) - 1
Loop
else
Do Until dw_report.object.datawindow.horizontalscrollmaximum <> "0"
dw_report.object.datawindow.print.preview.zoom =
integer(dw_report.object.datawindow.print.preview.zoom) + 1
Loop
dw_report.object.datawindow.print.preview.zoom =
integer(dw_report.object.datawindow.print.preview.zoom) - 1
end if
dw_report.setredraw(true)
return
Be careful though. This operation is sometimes very CPU intensive and can
cause a noticeable pause. Sorry for the late response but I hope you can
still use the technique.
Chris Gross
PB Developer's Station - http://www.geocities.com/~cgross1
Tom Hansen wrote in message <3676E134...@execpc.com>...