Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

RE: RE: Re: Tk - text widget - delete text

by Shendal (Hermit)
on Oct 03, 2000 at 22:54 UTC ( [id://35168]=note: print w/replies, xml ) Need Help??


in reply to RE: Re: Tk - text widget - delete text
in thread Tk - text widget - delete text

Here's a more complete example:
#!perl -w use strict; # always use Tk; my $Window = MainWindow->new(-title => "Test Window"); my $uframe =$Window->Frame() ->pack(-side => 'top', -fill => 'both', -expand => 1); my $dframe =$Window->Frame() ->pack(-side =>'top', -fill => 'x'); my $txtWidget = $uframe->Scrolled("Text") ->pack(-side => 'top', -fill => 'both', -expand => 1); my $pasteBtn = $dframe->Button(-text => "Paste", -command => sub { $txtWidget->insert('end',"blah b +lah") }) ->pack(-side => 'left'); my $clearBtn = $dframe->Button(-text => "Clear", -command => sub { $txtWidget->delete('0.0','end') } +) ->pack(-side => 'left'); MainLoop();

Cheers,
Shendal

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://35168]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found