Steve_BZ has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I'm getting "unable to resolve overloaded method for "Wx::RichTextCtrl::WriteImage" at /home/steve/Documents/Endoscopia/RichText_Editor.pl line 506" from code:
sub on_click_insert_image{ my ($i_frame, $event) = @_; my $file = Wx::FileSelector('Choose a media file'); + # Select video file $i_frame->{Ctl_Report_Text_Txt}->WriteImage(Wx::Image->new($file, +wxBITMAP_TYPE_PNG)); return $i_frame; }
But the same code with:
" $i_frame->{Ctl_Report_Text_Txt}->AddImage(Wx::Image->new($file, wxBI +TMAP_TYPE_PNG)); "
Works fine (but appends, rather than inserting the image). Does anyone know the correct syntax for WriteImage to insert an image at the current insertion point?
Update:OK, here's the answer:
" $i_frame->{Ctl_Report_Text_Txt}->WriteImageImage(Wx::Image->new($fil +e, wxBITMAP_TYPE_PNG)); "
Works fine too! Not quite sure about that naming convention!
Have a good day.
Regards
Steve
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: unable to resolve overloaded method for "Wx::RichTextCtrl::WriteImage"
by Anonymous Monk on Jan 28, 2010 at 19:33 UTC |