Removing text widget content with perl_tk

If we want to delete the content of the widget, we can use delete with the input object.

Example

$ent->delete(0,'end');

      

But I want to delete the content of the text widget. Can anyone tell me what is the function to remove the content of the text widget?

+2


a source to share


1 answer


use the following way

use Tk;

use Tk :: Text;

.........

my $ txt = $ mw-> Text (-background => 'white',) → pack ();

$ txt → delete ('1.0', 'end');



Refer to the links. http://legacyweb.triumf.ca/people/cpayne/perl/Tk/Text.html> Tk :: Text

+3


a source







All Articles