how to make readonly text area in perl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pradeeps
    New Member
    • Oct 2008
    • 17

    #1

    how to make readonly text area in perl

    i want to make my text area readonly. is there any way to do that in perl.

    any help,appreciate .......
  • nithinpes
    Recognized Expert Contributor
    • Dec 2007
    • 410

    #2
    Please be more clear while posting questions. If you are referring to Textbox in Perl-Tk, you can set this by using the '-state' option. After inserting required data in textbox, you may configure the state as 'disabled'. E.g.

    Code:
    my  $tx= $fr->Scrolled( 'Text', '-scrollbars' => 'e', '-background' => 'white',       
      )->pack( -fill => 'both', -expand => 1, -side => 'bottom' );
    $tx->insert('insert', "characters of line1\n");
    $tx->insert('insert',"characters of line2\n"');
    $tx->insert('insert',"characters of line3\n");
    $tx->insert('insert',"characters of line4\n");
    $tx->configure('-state'=> 'disabled'); ## set the state as disabled (non-editable)
    - Nithin

    Comment

    • pradeeps
      New Member
      • Oct 2008
      • 17

      #3
      thanks a lot nithin it worked.sorry i mean text box.ok.

      Comment

      Working...