Hi Guys,
Its not at all clear to me how to get data into Wx::PrintPreview (and I
expect Print too, when I get to that), I have pulled what I can out of the
Wx::Demo and I have constructed an event-handler as follows:
sub on_click_richtext_preview {
my( $this, $event ) = @_;
my $print = Wx::Printout->new( "Print" );
my $prev = Wx::Printout->new( "Print" );
my $preview = Wx::PrintPreview->new( $prev, $print );
print $preview -> IsOk(), "\n";
my $frame = Wx::PreviewFrame->new( $preview,
$this->{Ctl_Report_Text_Txt}, "Print Preview", [-1, -1], [600, -1] );
$frame->Initialize();
$frame->Show( 1 );
}
Where the data is in $this->{Ctl_Report_Text_Txt} (which is a
Wx::RichTextCtrl). This gives me a blank preview window with 32767 pages,
admittedly I haven't checked them all, but it appears to be blank.
Thanks and regards,
Steve