Hi Anirba
your best place to ask questions on Tcl is the 'comp.lang.tcl' usenet newsgroup (or Google groups), unless the question refers directly to the Sqlite Tcl bindings.
Another great source of info is the Tcler's Wiki which has answers and example code to this and hundreds of other topics. Although the site search facility isn't too brilliant, you can use Google to searh this site for many answers.
The Tclers wiki can be found at http://wiki.tcl.tk/
Searching on Google using 'site:wiki.tcl.tk text read only' returns the URL http://wiki.tcl.tk/1152 which discusses various techniques for what you are tring to achieve.
The simplest technique is to just enable the text widget whilst inserting text, e.g.
.f2.t1 configure -state enabled .f2.t1 insert end [string trim $nm] .f2.t1 configure -state disabled
Lawrence
Hi all,
I have a text widget which successfully fetches data from a backend sqlite database and displays it in the text widget. My requirement is that I want to make the text widget readonly so that no one can edit the fetched data. I use '-state disabled' but that hides the data that is displayed in the text widget.
Kindly help.
The relevant portion of the code is undergiven: text .f2.t1 -bd 1 -highlightbackground black -highlightthickness 1 -font $fnt9 -state disabled .f2.t1 insert end [string trim $nm] place .f2.t1 -x 65 -y 25 -width 170 -height 16
Thanxs in advance.
Anirban Sarkar