develooper Front page | perl.wxperl.users | Postings from May 2010

RichText Printing Headers and Footers.

Thread Next
From:
Steve Cookson
Date:
May 5, 2010 11:26
Subject:
RichText Printing Headers and Footers.
Message ID:
AAEB33AD5BF04159BACB9C472FEC6B5D@SACWS001
Hi,

I'd like to include images in my RichText Printing Headers and Footers.  I
assume that I can over-ride the OnPrintPage function, so I've done this:

Wx::RichTextPrintout::OnPrintPage{
    my ($self, $page) = @_;
    my $dc = self->GetDC();
    if ($dc){
        if (HasPage($page))
 
$dc->DrawBitmap(Wx::Bitmap->new('/home/steve/Documents/logo.png',1,1));
            RenderPage($dc, $page);
        return 1;
    }
    else return 0;
}

However, nothing happens. I don't think my code has been executed. The print
preview works normally. Even if I put a 'print' statement in, it is ignored.
 
It has a 'use Wx' earlier, but does it need a 'use base'?  My OO is not yet
very developed and I'm not sure how the call should be implemented.

Thanks

Regards

Steve



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About