Prev: How to handle user input in multiple non modal windows?
Next: Bash tee: equivalent behaviour in tcl [Linux]
From: S-Y. Chen on 3 Aug 2010 11:58 Dear All, I guess this is a stupid question, but I just don't know how to do it. How do I highlight a whole line under the current cursor position ? Thanks for the help. Regards S-Y. Chen
From: S-Y. Chen on 3 Aug 2010 12:58 On Aug 3, 11:58 pm, "S-Y. Chen" <shenyeh_c...(a)hotmail.com> wrote: > Dear All, > > I guess this is a stupid question, but I just don't know how to do it. > > How do I highlight a whole line under the current cursor position ? > > Thanks for the help. > > Regards > S-Y. Chen Sorry I didn't explained it well........something is lost in my previous lost. What I meant was, how can I highlight a whole line under the current cursor position in a text widget ? Thanks for the help. Regards S-Y. Chen
From: Aric Bills on 3 Aug 2010 13:45 On Aug 3, 10:58 am, "S-Y. Chen" <shenyeh_c...(a)hotmail.com> wrote: > On Aug 3, 11:58 pm, "S-Y. Chen" <shenyeh_c...(a)hotmail.com> wrote: > > > Dear All, > > > I guess this is a stupid question, but I just don't know how to do it. > > > How do I highlight a whole line under the current cursor position ? > > > Thanks for the help. > > > Regards > > S-Y. Chen > > Sorry I didn't explained it well........something is lost in my > previous lost. > > What I meant was, how can I highlight a whole line under the current > cursor position in a text widget ? > > Thanks for the help. > > Regards > S-Y. Chen How about something like this: $text tag configure highlight \ -background blue -foreground white $text tag add highlight \ [list insert display linestart] \ [list insert display lineend + 1 char]
From: Bruce on 3 Aug 2010 14:06
S-Y. Chen wrote: > On Aug 3, 11:58 pm, "S-Y. Chen" <shenyeh_c...(a)hotmail.com> wrote: >> Dear All, >> >> I guess this is a stupid question, but I just don't know how to do it. >> >> How do I highlight a whole line under the current cursor position ? >> >> Thanks for the help. >> >> Regards >> S-Y. Chen > > Sorry I didn't explained it well........something is lost in my > previous lost. > > What I meant was, how can I highlight a whole line under the current > cursor position in a text widget ? > > Thanks for the help. > > Regards > S-Y. Chen > short answer $txtWidget tag add sel "insert linestart" "insert lineend" long answer http://www.tcl.tk/man/tcl8.6/TkCmd/text.htm Bruce |