Howto retrieve previously assigned place coordinates.


Read With Formatting | Free Open Source Tutorials Account

Perl Programming
Thread: Howto retrieve previously assigned place coordinates.


hansolox1
Is there a way to retrieve the x and y coordinates of a widget such as a label or entry that was positioned using the place geometry manager. For instance:

$label1->place(-x => 10, -y => 10);

Later in the program in a different sub routine I would like to retrive the x and y values.

my $xcoord = $label1->cget(-x);
my $ycoord = $label1->cget(-y);

The above two lines of code fail.