Silvio, this is a way to implement it, but sure there's a better way
New DATA lShowPageBreak INIT .F.
New METHODS
//----------------------------------------------------------------------------//
METHOD ShowPageBreak() CLASS TRichEdit5
local nOldLine := ::GetRow()
if !::lShowPageBreak
::lShowPageBreak := .T.
::GoToLine( 1 )
::ReplaceAll( , Chr( 12 ), .T., .F., .T., .T., "«»»", .F. )
::GoToLine( nOldLine )
//else
//::Find( "«»»", .T., .F., .T. )
//MsgInfo( "Page Break Symbols Actives", "Attention" )
endif
Return nil
//----------------------------------------------------------------------------//
METHOD HidePageBreak() CLASS TRichEdit5
local nOldLine := ::GetRow()
if ::lShowPageBreak
::lShowPageBreak := .F.
::GoToLine( 1 )
::ReplaceAll( , "«»»", .T., .F., .T., .T., Chr( 12 ), .F. )
::GoToLine( nOldLine )
//else
//::Find( Chr( 12 ), .T., .F., .T. )
//MsgInfo( "Page Break Symbols Inactives", "Attention" )
endif
Return nil
//----------------------------------------------------------------------------//
You should not forget in the methods and printing functions include a call to the method HidePageBreak