Connecting Tech Pros Worldwide Help | Site Map

how to make readonly text area in perl

 
LinkBack Thread Tools Search this Thread
  #1  
Old October 22nd, 2008, 08:17 AM
Newbie
 
Join Date: Oct 2008
Posts: 17
Default 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.......
Reply
  #2  
Old October 22nd, 2008, 09:06 AM
nithinpes's Avatar
Expert
 
Join Date: Dec 2007
Posts: 383
Default

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
Reply
  #3  
Old October 22nd, 2008, 09:11 AM
Newbie
 
Join Date: Oct 2008
Posts: 17
Default

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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.