Connecting Tech Pros Worldwide Forums | Help | Site Map

how to make readonly text area in perl

Newbie
 
Join Date: Oct 2008
Posts: 17
#1: Oct 22 '08
i want to make my text area readonly. is there any way to do that in perl.

any help,appreciate.......

nithinpes's Avatar
Expert
 
Join Date: Dec 2007
Posts: 400
#2: Oct 22 '08

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
Newbie
 
Join Date: Oct 2008
Posts: 17
#3: Oct 22 '08

re: how to make readonly text area in perl


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