again i have a problem with the FW Preview window.
I finally managed to get a nearly bare screen without any buttons except the one to close.
This button I want to put at the right end of the bar.
But I can't.
When I ask for the value oWnd:nWidht it gives me 545 which is completely wrong.
Here my code:
- Code: Select all Expand view RUN
- #include "FiveWin.ch"
REQUEST FWHARU
PROCEDURE Main()
//----------------
LOCAL oPrn
TPreview():bSetUp := { |oPreview, oWnd| oWnd:oMenu:End(), oWnd:oMsgBar:End(),;
oPreview:oBar:bPainted := {|| NIL } ,;
oWnd:oBar:aControls[ 2 ]:End() ,;
msginfo( "width of window: " + trim( str( oWnd:nWidth ) ) ),;
oWnd:oBar:aControls[ 1 ]:nLeft := oWnd:nWidth - 32,;
oPreview:oFactor:End();
}
RPrevUserBtns( { |oPrV, oBar| ReportExtend( oPrV, oBar ) }, 2007, { 48, 48 } )
TPreview():lListViewHide := .t.
TPrinter():lUseHaruPDF := .t.
PRINT oPrn NAME "Druckvorschau" PREVIEW
PAGE
oPrn:Say( "Line one" )
ENDPAGE
ENDPRINT
RETURN
FUNCTION ReportExtend( oPreview, oBar )
//-------------------------------------
do while len( oBar:aControls ) > 0
oBar:Del( Len( oBar:aControls ) )
enddo
RETURN .f.
I'll be glad for any helping idea.
Thanks,
Detlef