Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Counting in octal is just like counting in decimal--if you don't use your thumbs. -- Tom Lehrer


devel / comp.lang.tcl / Re: How many tabs in a ttk::notebook row?

SubjectAuthor
* How many tabs in a ttk::notebook row?Luc
+* Re: How many tabs in a ttk::notebook row?Rich
|`- Re: How many tabs in a ttk::notebook row?Luc
`- Re: How many tabs in a ttk::notebook row?Harald Oehlmann

1
How many tabs in a ttk::notebook row?

<20230507135749.764ec63e@lud1.home>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: How many tabs in a ttk::notebook row?
Date: Sun, 7 May 2023 13:57:49 -0300
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <20230507135749.764ec63e@lud1.home>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="34f7286b177195bec18719584c654c4e";
logging-data="3626852"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/8wVx2Ufwt35ZrE/L26f7XDK3ut1kzNQw="
Cancel-Lock: sha1:ANYd5YMkLue4YF5oCfCQWJA5pPo=
 by: Luc - Sun, 7 May 2023 16:57 UTC

Will you please look at this screenshot:

https://0x0.st/HZVM.png

I am using ttk::notebook for the tabs. Apparently, my limit before
the tab names are truncated is 16 tabs.

Instead of bothering with scrolling or anything like that, I have
decided to just create a new row of tabs under that one. So I will
have 32 tabs. I for one think that having all tabs visible all the
time without the need for scrolling may be a better experience than
the one I'm used to having.

I am stil thinking about what to do if the user wants to have more
than 32 tabs. I already have some ideas.

Anyway, my screen has room for 16 tabs, but what about other people?
I only found 16 by trial and error, not with any kind of calculation.
For other people's screen, the application will have to do some math.

But how? Is it possible to determine how many tabs anyone's window
can have before the tab names get truncated?

Note: the tab names *will* vary.

--
Luc
>>

Re: How many tabs in a ttk::notebook row?

<u396oa$3hmme$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rich@example.invalid (Rich)
Newsgroups: comp.lang.tcl
Subject: Re: How many tabs in a ttk::notebook row?
Date: Sun, 7 May 2023 21:55:23 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <u396oa$3hmme$1@dont-email.me>
References: <20230507135749.764ec63e@lud1.home>
Injection-Date: Sun, 7 May 2023 21:55:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4ad2f5140d3010de47ff4cc2c5771cd2";
logging-data="3726030"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18G49AaGkEeyiN1lk1eQcm2"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.19 (x86_64))
Cancel-Lock: sha1:sYt9/siJcAALhVA55hX63pYemto=
 by: Rich - Sun, 7 May 2023 21:55 UTC

Luc <luc@sep.invalid> wrote:
>
> But how? Is it possible to determine how many tabs anyone's window
> can have before the tab names get truncated?

Maybe. I don't think the notebook provides any feedback for that
however.

But, as you will know the tab names, and know the font you are using,
you could use [font measure] on all of the tab names, sum up the total
pixel size of the set of names, and compare that sum with the pixel
width of the area in which you are positioning the notebook.

If the sum is larger, then truncation will occur. If the sum is much
smaller, no truncation would occur. You may have to do some
experiments for "sum close in size to view" to determine what value
indicates possible truncation with reasonable probability.

Re: How many tabs in a ttk::notebook row?

<u3a6jb$3qd38$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortkarg3@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: How many tabs in a ttk::notebook row?
Date: Mon, 8 May 2023 08:58:54 +0200
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <u3a6jb$3qd38$1@dont-email.me>
References: <20230507135749.764ec63e@lud1.home>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 8 May 2023 06:58:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ef97227b88b2d5d5a12c902459876358";
logging-data="4011112"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/C+i1+bP7AbPBGhnueKha/"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:+g1VRwPEt4ORHdNpzfroH2pa0/s=
In-Reply-To: <20230507135749.764ec63e@lud1.home>
Content-Language: en-GB
 by: Harald Oehlmann - Mon, 8 May 2023 06:58 UTC

Am 07.05.2023 um 18:57 schrieb Luc:
> Will you please look at this screenshot:
>
> https://0x0.st/HZVM.png
>
> I am using ttk::notebook for the tabs. Apparently, my limit before
> the tab names are truncated is 16 tabs.
>
> Instead of bothering with scrolling or anything like that, I have
> decided to just create a new row of tabs under that one. So I will
> have 32 tabs. I for one think that having all tabs visible all the
> time without the need for scrolling may be a better experience than
> the one I'm used to having.
>
> I am stil thinking about what to do if the user wants to have more
> than 32 tabs. I already have some ideas.
>
> Anyway, my screen has room for 16 tabs, but what about other people?
> I only found 16 by trial and error, not with any kind of calculation.
> For other people's screen, the application will have to do some math.
>
> But how? Is it possible to determine how many tabs anyone's window
> can have before the tab names get truncated?
>
> Note: the tab names *will* vary.
>

The notebook is horrible in this respect. Csaba has created scrollutil
on it, where you get solutions for two issues:
- tabs scrolling arrows
- window resize on max of clients excluding the tabs.

As a side note, I want to remember Eric Boudalliers great BWidget, which
had all this 20 or 30 years ago. He recently gave a message on the core
list, so thanks to him on this way ;-).

Harald

Re: How many tabs in a ttk::notebook row?

<20230509230301.542c46a4@lud1.home>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luc@sep.invalid (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: How many tabs in a ttk::notebook row?
Date: Tue, 9 May 2023 23:03:01 -0300
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <20230509230301.542c46a4@lud1.home>
References: <20230507135749.764ec63e@lud1.home>
<u396oa$3hmme$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="e1c84e2256edaf57502263645848a608";
logging-data="584980"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7IId4m/WNOtYP4gmXUkc5nUSWWdInD5c="
Cancel-Lock: sha1:TaNsNMtEHWf008Wg0Bu8c6MbnLQ=
 by: Luc - Wed, 10 May 2023 02:03 UTC

On Sun, 7 May 2023 21:55:23 -0000 (UTC), Rich wrote:

> Luc <luc@sep.invalid> wrote:
> >
> > But how? Is it possible to determine how many tabs anyone's window
> > can have before the tab names get truncated?
>
> Maybe. I don't think the notebook provides any feedback for that
> however.
>
> But, as you will know the tab names, and know the font you are using,
> you could use [font measure] on all of the tab names, sum up the total
> pixel size of the set of names, and compare that sum with the pixel
> width of the area in which you are positioning the notebook.
>
> If the sum is larger, then truncation will occur. If the sum is much
> smaller, no truncation would occur. You may have to do some
> experiments for "sum close in size to view" to determine what value
> indicates possible truncation with reasonable probability.

For whatever it's worth, [font measure] didn't work at all. It kept
giving me very short pixel counts such as 118, 138 or 150 depending
on how much "padding" (additional spaces) I added to the calculation.
The correct number was 178.

What really worked (and gave me the 178) was [winfo geometry widget]
which gave me accurate numbers of pixels, a correct final sum and a
correct estimate of the maximum number of tabs per row.

Case closed. Thank you.

--
Luc
>>


devel / comp.lang.tcl / Re: How many tabs in a ttk::notebook row?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor