#NEWLINE# def OnPaint( self , evt ) : #NEWLINE# #INDENT# dc = wx . PaintDC ( self ) #NEWLINE# inset = ( 20 , 20 , 20 , 20 ) #NEWLINE# rect = [ inset [ 0 ] , inset [ 1 ] , ( self . GetSize ( ) . width - ( inset [ 0 ] + inset [ 2 ] ) ) , ( self . GetSize ( ) . height - ( inset [ 1 ] + inset [ 3 ] ) ) ] #NEWLINE# dc . SetFont ( self . font ) #NEWLINE# dc . SetPen ( wx . RED_PEN ) #NEWLINE# rect [ 3 ] = WordWrapRenderer . CalculateHeight ( rect , self . text , rect [ 2 ] ) #NEWLINE# dc . DrawRectangle ( * rect ) #NEWLINE# WordWrapRenderer . DrawString ( dc , self . text , rect , wx . ALIGN_LEFT )