I have been unable to get any events working with this control.  Any thoughts?

use Win32::GUI;

my $Window = new Win32::GUI::Window (
        -name   => "Window",
        -topmost => 1,
        -left   => 300,
        -dialogui => 1,
        -top    => 400,
        -width  => 222,
        -height => 235,
        -text   => "Test",
   # ....
        -events =>
        {
                Terminate => sub { print "Dying\n"; return -1 },
        },
);

        $Window->AddDateTime(
                -top    =>      1,
                -left   =>      1,
                -width  => 180,
                -height =>      25,
                -name   =>      "dateFromT",
                -events =>
                        {
                                #Click => sub { print "Got a Click\n"; },
                                LostFocus  => sub { print "Lost Focus\n"; },
                        },
                -onClick => sub { print "Got a Click\n"; },
                -onChange => sub { print "Got a Click\n"; },
        );

$Window->Enable();
$Window->Show();
Win32::GUI::Dialog;

I also tried the named sub way, and this also failed.

Joe Frazier, Jr.
Technical Support Engineer
Peopleclick Service Support

Tel:  +1-800-841-2365
E-Mail: mailto:[EMAIL PROTECTED]


> -----Original Message-----
> From: Anthony George [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 01, 2002 8:24 AM
> To: gabor.borus; Perl List
> Subject: Re: [perl-win32-gui-users] DateTime object in 
> Win32::GUI 0.665
> 
> 
> -----Original Message-----
> From: "gabor.borus" <[EMAIL PROTECTED]>
> To: "Perl List" <perl-win32-gui-users@lists.sourceforge.net>
> Date: Tue, 1 Oct 2002 12:34:11 +0200
> Subject: [perl-win32-gui-users] DateTime object in Win32::GUI 0.665
> 
> > Hi all!
> > 
> > Has anybody a working example for DateTime object?
> 
>       new Win32::GUI::DateTime (
>               $mywindow,
>               -top    =>      1,
>               -left   =>      1,
>               -width  =>      90,
>               -height =>      25,
>               -name   =>      "dateFromT",
>       );
> 
> 
> sub something_Click {
>     my($mmF,$ddF,$yyF)=split(/\//,$mywindow->dateFromT->Text());
> }
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: DEDICATED SERVERS only $89!
> Linux or FreeBSD, FREE setup, FAST network. Get your own server 
> today at http://www.ServePath.com/indexfm.htm
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 

Reply via email to