Connecting Tech Pros Worldwide Help | Site Map

how to make readonly text area in perl

  #1  
Old October 22nd, 2008, 09:17 AM
Newbie
 
Join Date: Oct 2008
Posts: 17
i want to make my text area readonly. is there any way to do that in perl.

any help,appreciate.......
  #2  
Old October 22nd, 2008, 10:06 AM
nithinpes's Avatar
Expert
 
Join Date: Dec 2007
Posts: 400
Provided Answers: 1

re: how to make readonly text area in perl


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.

Expand|Select|Wrap|Line Numbers
  1. my  $tx= $fr->Scrolled( 'Text', '-scrollbars' => 'e', '-background' => 'white',       
  2.   )->pack( -fill => 'both', -expand => 1, -side => 'bottom' );
  3. $tx->insert('insert', "characters of line1\n");
  4. $tx->insert('insert',"characters of line2\n"');
  5. $tx->insert('insert',"characters of line3\n");
  6. $tx->insert('insert',"characters of line4\n");
  7. $tx->configure('-state'=> 'disabled'); ## set the state as disabled (non-editable)
  8.  
  9.  
- Nithin
  #3  
Old October 22nd, 2008, 10:11 AM
Newbie
 
Join Date: Oct 2008
Posts: 17

re: how to make readonly text area in perl


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