Hi,

Most of the active people on this list are Perl "experts".

Here's the code to make a logging box like you asked for:

# Make a really simple new window:
my $popup = new Win32::GUI::DialogBox (
        -name => "LogPopup",
        -left => 100,
        -top => 100,
        -width => 200,
        -height => 200,
        -text => "Log"
);

# And add a textfield that fills it
$popup->AddTextfield(
        -name => "LogText",
        -left => 0,
        -top => 0,
        -width => $popup->ScaleWidth,
        -height => $popup->ScaleHeight,
        -multiline => 1
);

# Show the window.
$popup->Show();

# Define our logging subroutine
sub logline {
        # Take one argument off the front of the arguments
        # list (@_) and put it in $text.
        my $text = shift;

        # Change the text of the textfield to it's current text
        # plus our new log line (in $text) plus carriage
        # return then linefeed characters.
        $popup->LogText->Text($popup->LogText->Text().$text."\r\n");
}


# END

Now, in your utility scripts you should be able to use

&MAIN::logline("Hello, world!");

To log a line to the text field.

Steve


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> #SHUCHI MITTAL#
> Sent: 08 January 2004 08:33
> To: perl-win32-gui-users@lists.sourceforge.net
> Subject: [perl-win32-gui-users] PERL Expert
> 
> 
> Hi all
>  
> I am sorry if this is the wrong place to post this message 
> but I was wondering if anyone here is a general expert at the 
> PERL language other than just at the Win32::GUI module.
> I needed some help and the regular perl forums and tutorials 
> havent cleared my doubts so was hoping I can get  some help 
> from here. Please reply to this post if you there is someone 
> very good with regular expressions/pattern matching and HTML 
> text extraction with PERL. Need urgent help.
>  
> Thanx to one n all....
>  
> Ciao..
>  
> Shuchi
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Perforce Software.
> Perforce is the Fast Software Configuration Management System offering
> advanced branching capabilities and atomic changes on 50+ platforms.
> Free Eval! http://www.perforce.com/perforce/loadprog.html
> _______________________________________________
> 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