Hello ,
I want to implement a subroutine which return caller's text value (caller
maybe a Label control, Button control...etc)
the following is the code :
$W1->AddLabel(
-name => "Label1",
-text => "label 1",
-notify => 1,
-font => $font,
-pos => [ 50, 50 ],
-onClick =>\&show_text,
);
$W1->AddLabel(
-name => "Label2",
-text => "label2",
-notify => 1,
-font => $font,
-pos => [ 50, 50 ],
-onClick =>\&show_text,
);
$W1->AddButton(
-name => "Button1",
-text => "button1",
-notify => 1,
-font => $font,
-pos => [ 50, 50 ],
-onClick =>\&show_text,
);
sub show_text {
#print the caller object's text value. Print "button1" if Button1 is
clicked, "label 1" if Label1 is clicked..etc
}
How should I implement the show_text subroutine?
thanks for any reply
--
View this message in context:
http://www.nabble.com/return-the-text-of-an-object-tf4625127.html#a13208401
Sent from the perl-win32-gui-users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Perl-Win32-GUI-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/