in reply to Re: Perl Tk User Interface & the rest of the Perl program
in thread Perl Tk User Interface & the rest of the Perl program

Dear Courage,

Thanks for your reply!

However, I'm extremely new to Perl & Tk, so I don't know how to write a wrapper. Are there properties in certain widgets that will allow me to return to the original program after the user presses the button?

Thanks again!
  • Comment on Re: Re: Perl Tk User Interface & the rest of the Perl program

Replies are listed 'Best First'.
Re: Re: Re: Perl Tk User Interface & the rest of the Perl program
by Courage (Parson) on Aug 14, 2002 at 19:40 UTC
    when user presses a button, you can manage it to invoke a sub which, in turn, will do what I just said and return.

    Here is oneliner for Win32 that will demonstrate what I just said:

    perl -MTk -lwe "for(tkinit){$_->Button(-text=>'test',-command=>sub{pri +nt'do anything you want here, i.e. call your favourite program'})->pa +ck;$_->Text->pack};MainLoop"
    OTOH there are quite a lot of examples of Tk programs here and there, so you can start using them right away.

    Courage, the Cowardly Dog