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.
>
> <example>
>
> my $dc = new Wx::WindowDC($w);
> $dc->SetFont($font);
> my ($width,$height,$d,$e) = $dc->GetTextExtent($text);
> print "text=$text width=$width, height=$height\n";
>
> </example>
>
> 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 ).
Sorry
Mattia
|