in reply to Re: Newbie TK question
in thread Newbie TK question

OK...that worked great for the entry bind. Now, how would I add text without using bind? In other words, I just want to put some sort of text in (not dependent on the user entering test and not using bind). Does that make sense?

Replies are listed 'Best First'.
Re^3: Newbie TK question
by GrandFather (Saint) on Jul 21, 2006 at 23:09 UTC

    Sorry for the long delay before replying. This is possibly what you want:

    use strict; use warnings; use Tk; # Main Window my $mw = new MainWindow; #GUI Building Area my $frm_name = $mw -> Frame()->pack(); my $lab = $frm_name -> Label(-text=>"Name:")->pack(-side=>'left'); my $ent = $frm_name -> Entry(-text=>'Some text')->pack(); #Text Area my $textarea = $mw -> Frame()->pack(); my $txt = $textarea -> Text(-width=>40, -height=>10)->pack(); MainLoop();

    DWIM is Perl's answer to Gödel