#61 AbsLeft and AbsTop move both co-ordinates

closed
Robert May
None
6
2006-11-05
2006-10-16
Robert May
No

Assuming that AbsLeft and AbsTop are supposed to set
the Left/Top window co-ordinate in screen
co-ordinates(?) then the implementation is wrong. The
following shows the problem:

#!perl -w
use strict;
use warnings;

use Win32::GUI();

my $mw = new Win32::GUI::Window (
-pos => [30, 20],
-size => [400, 300],
);

my $tf = $mw->AddTextfield(
-size => [100,100],
);

my ($left, $top) = $mw->ClientToScreen(0,0);
print "Expecting to move tf to: $left, $top (Screen
Co-ordinates) - 0, 0 (Client)\n";

$tf->AbsLeft($left);
$tf->AbsTop($top);

my $l = $tf->Left();
my $t = $tf->Top();

($left, $top) = $mw->ClientToScreen($l, $t);
print "Actually moved tf to: $left, $top (Screen
Co-ordinates) - $l, $t (Client)\n";

Discussion

  • Robert May
    Robert May
    2006-10-30

    • priority: 5 --> 6
    • assigned_to: nobody --> robertemay
     
  • Robert May
    Robert May
    2006-11-05

    • status: open --> closed