From: S-Y. Chen on
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
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
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
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