Please set word wrap to something like 75 columns, thanks!
> I am having no joy with either wxDC::GetTextExtent() or wxWindow::GetTextExtent().
> I've paid attention to the note saying "In wxPerl this method is
> implemented as GetTextExtent( string, font = undef ) returning a
> four element array ( $width, $height, $descent, $externalLeading )"
> yet I am getting an undef return value.
> my $dc = new Wx::WindowDC($w);
> my ($width,$height,$d,$e) = $dc->GetTextExtent($text);
> print "text=$text width=$width, height=$height\n";
> I've tried the above using $w->GetTextExtent($text) after a $w->SetFont($font)
> - same result. $w, $font and $text have all been verified to be
> expected values and don't seem to be part of the problem.
> anyone have any experience or ideas?
yes, there is a bug in ( the wxPerl wrapper of ) both functions :-(
( propagated by cut'n'paste... ); the
fixed version will be in the next wxPerl release; there is no
workaroud I know ( unless you want to recompile wxPerl ).
On Tue, 26 Feb 2002, David Roe wrote:
>> yes, there is a bug in ( the wxPerl wrapper of ) both
>> functions :-( ( propagated by cut'n'paste... ); the
>> fixed version will be in the next wxPerl release; there
>> is noworkaroud I know ( unless you want to recompile wxPerl ).
>i am happy to recompile the wxPerl source. i have the standard wx2
>installation and MS VC++ 6.0. are there any other requirements?
No, but since the release will be probably in 3/5 days, there is little
point in compiling it now. If you still want to do that, you should
download the current CVS snapshot from the wxPerl site, which is what will
be released, and contains the fix you want.