How do you do this in python with tk?

Eric Brunel eric_brunel at despammed.com
Mon Oct 11 05:42:43 EDT 2004


Ali wrote:
> klappnase at web.de (klappnase) wrote in message news:<a7a67196.0410082348.36fd45a at posting.google.com>...
> 
>>alikakakhel3 at hotmail.com (Ali) wrote in message news:<8f17f4bc.0410081736.5ab4a62 at posting.google.com>...
>>
>>>>>You can set the text widget to be "disabled" to
>>>>>keep the user from changing the contents.
>>>
>>>How? I tryed putting diabled in there and disabled=yes and
>>>disabled='yes'. None of them worked :(
>>
>>Try state="disabled"
>>
>>Michael
> 
> 
> I tryed that and it stoped showing the text I want it to show :(

Setting state='disabled' does not only prevent the user from editing the text, 
but also prevents *you* from modifying the text via the insert or delete 
methods. So whenever you want to insert or delete lines in the text, you must 
configure its state to 'normal' before, do the modification, then set back its 
state to 'disabled'

HTH
-- 
- Eric Brunel <eric (underscore) brunel (at) despammed (dot) com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com



More information about the Python-list mailing list