The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Tkx::ROText - Tkx text widget that supports a read-only state.


        use Tkx::ROText;
        my $text = $parent->new_tkx_ROText();


Tk's text widget doesn't support the 'readonly' state, nor does Tk have a separate read-only text widget. This means that Tkx -- being a thin wrapper around Tcl/Tk -- doesn't either.

Instead of providing a text widget that is always read-only (like Perl/Tk's Tk::ROText) this module provides a text widget that supports the 'readonly' state. This makes it possible to switch the widget between being read-only and editable.

When the state is 'readonly' the widget's contents cannot be changed by the user but may be modified programmatically. In all other ways it behaves as (and in fact is) a standard text widget.

The default state is 'readonly.'


Please report any bugs or feature requests to bug-tkx-rotext at or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

        perldoc Tkx::ROText

You can also look for information at:


Michael J. Carman, <mjcarman at>


Copyright 2009 Michael J. Carman, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.