2008/7/18 Roode, Eric <[EMAIL PROTECTED]>: > > On 17 July 2008, Sean Healy wrote: >> >> ($x, $y) = $Label->GetTextExtentPoint32($string); > > Upon further experimentation, there is something not quite right with > that. The width it returns is too wide. There seems to be some sort > of per-character skew -- short strings are very accurate; longer > strings get progressively worse.
The Win32::GUI GetTextExtentPoint32(...) implementation uses the default system font sizing if you don't tell it what font to use. I think this is not as expected (or intended). Try this instead as a work around: my ($x, $y) = $Label->GetTextExtentPoint32( $string, $Label->GetFont() ); It would be much appreciated if you could raise a bug report for this, as if called as a method against a window without a font specified then I think the implementation should use the window's current font. Regards, Rob. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/