Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

A mathematician is a device for turning coffee into theorems. -- P. Erdos


devel / comp.lang.tcl / Text widget

SubjectAuthor
* Text widgetsnosniv
`* Text widgetRich
 `- Text widgetsnosniv

1
Text widget

<5098f588-5217-42f6-b36c-7592b6b3c8f6n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10392&group=comp.lang.tcl#10392

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:1657:b0:6ff:ab52:af3b with SMTP id c23-20020a05620a165700b006ffab52af3bmr716907qko.293.1671485732021;
Mon, 19 Dec 2022 13:35:32 -0800 (PST)
X-Received: by 2002:a05:620a:8087:b0:6fe:d320:697d with SMTP id
ef7-20020a05620a808700b006fed320697dmr12357503qkb.322.1671485731830; Mon, 19
Dec 2022 13:35:31 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 19 Dec 2022 13:35:31 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=82.1.128.13; posting-account=gstOigoAAADV9pmzZL58qQ436SKV3SBu
NNTP-Posting-Host: 82.1.128.13
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5098f588-5217-42f6-b36c-7592b6b3c8f6n@googlegroups.com>
Subject: Text widget
From: nivpars...@gmail.com (snosniv)
Injection-Date: Mon, 19 Dec 2022 21:35:32 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1547
 by: snosniv - Mon, 19 Dec 2022 21:35 UTC

Is it possible to make a text widget scroll when lines of text reach the bottom of the window?
At the moment, I can display 10 lines of text, but lines 11 & beyond are off the window bottom, although I can scroll down with the mouse, I'd prefer if it'd auto scroll as each extra line was added.

This is a sample of adding one line of text, which is short, all lines about 30 chars max & fit a line easily:

$f7.txt00 configure -state normal
$f7.txt00 insert insert "$blk_cnt:- <'simple text to output'>\n"
$f7.txt00 configure -state disabled
incr blk_cnt

TIA, Kev P.

Re: Text widget

<tnqndu$eqi7$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10393&group=comp.lang.tcl#10393

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ric...@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: Text widget
Date: Mon, 19 Dec 2022 22:09:02 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <tnqndu$eqi7$1@dont-email.me>
References: <5098f588-5217-42f6-b36c-7592b6b3c8f6n@googlegroups.com>
Injection-Date: Mon, 19 Dec 2022 22:09:02 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="0099815950bbb57350985fcf75d0a84d";
logging-data="485959"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nN1CCA4ZuFT496/sX6lci"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:t8m+9TvZ/YPVt+lgyoIYF01Gwn4=
 by: Rich - Mon, 19 Dec 2022 22:09 UTC

snosniv <nivparsons@gmail.com> wrote:
> Is it possible to make a text widget scroll when lines of text reach the bottom of the window?
> At the moment, I can display 10 lines of text, but lines 11 & beyond are off the window bottom, although I can scroll down with the mouse, I'd prefer if it'd auto scroll as each extra line was added.
>
> This is a sample of adding one line of text, which is short, all lines about 30 chars max & fit a line easily:
>
> $f7.txt00 configure -state normal
> $f7.txt00 insert insert "$blk_cnt:- <'simple text to output'>\n"
> $f7.txt00 configure -state disabled
> incr blk_cnt
>
> TIA, Kev P.

What you are looking for is the "see" sub-command to the text widget.
With the 'end' index.

If you want the widget to always show the last line added then:

$text insert end "new line of text\n"
$text see end

Note that 'end' there is a text index, so other valid indexes are also
possible, to move the view to show that index within the widget.

Re: Text widget

<ceb0483e-c6ba-4c21-a311-477d351971f2n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10403&group=comp.lang.tcl#10403

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a37:5343:0:b0:6ec:544b:f708 with SMTP id h64-20020a375343000000b006ec544bf708mr66654533qkb.192.1671555809395;
Tue, 20 Dec 2022 09:03:29 -0800 (PST)
X-Received: by 2002:a05:620a:b90:b0:6ff:8f5a:1d37 with SMTP id
k16-20020a05620a0b9000b006ff8f5a1d37mr1808041qkh.501.1671555809164; Tue, 20
Dec 2022 09:03:29 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Tue, 20 Dec 2022 09:03:28 -0800 (PST)
In-Reply-To: <tnqndu$eqi7$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=82.1.128.13; posting-account=gstOigoAAADV9pmzZL58qQ436SKV3SBu
NNTP-Posting-Host: 82.1.128.13
References: <5098f588-5217-42f6-b36c-7592b6b3c8f6n@googlegroups.com> <tnqndu$eqi7$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ceb0483e-c6ba-4c21-a311-477d351971f2n@googlegroups.com>
Subject: Re: Text widget
From: nivpars...@gmail.com (snosniv)
Injection-Date: Tue, 20 Dec 2022 17:03:29 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2277
 by: snosniv - Tue, 20 Dec 2022 17:03 UTC

On Monday, 19 December 2022 at 22:09:06 UTC, Rich wrote:
> snosniv <nivpa...@gmail.com> wrote:
> > Is it possible to make a text widget scroll when lines of text reach the bottom of the window?
> > At the moment, I can display 10 lines of text, but lines 11 & beyond are off the window bottom, although I can scroll down with the mouse, I'd prefer if it'd auto scroll as each extra line was added.
> >
> > This is a sample of adding one line of text, which is short, all lines about 30 chars max & fit a line easily:
> >
> > $f7.txt00 configure -state normal
> > $f7.txt00 insert insert "$blk_cnt:- <'simple text to output'>\n"
> > $f7.txt00 configure -state disabled
> > incr blk_cnt
> >
> > TIA, Kev P.
> What you are looking for is the "see" sub-command to the text widget.
> With the 'end' index.
>
> If you want the widget to always show the last line added then:
>
> $text insert end "new line of text\n"
> $text see end
>
> Note that 'end' there is a text index, so other valid indexes are also
> possible, to move the view to show that index within the widget.

Worked nicely, thank you. (Simple when you know how)! :-)

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor