Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

All language designers are arrogant. Goes with the territory... -- Larry Wall


devel / comp.lang.tcl / Grid Widgets same width and -sticky w

SubjectAuthor
* Grid Widgets same width and -sticky wAlexandru
`* Re: Grid Widgets same width and -sticky wAlexandru
 `* Re: Grid Widgets same width and -sticky wAndreas Leitgeb
  `* Re: Grid Widgets same width and -sticky wAlexandru
   `* Re: Grid Widgets same width and -sticky wRalf Fassel
    `* Re: Grid Widgets same width and -sticky wRalf Fassel
     `- Re: Grid Widgets same width and -sticky wAlexandru

1
Grid Widgets same width and -sticky w

<4e1b4490-d61c-4abc-b8a8-30297c952e9en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ad4:4aea:0:b0:63c:fb61:1a4a with SMTP id cp10-20020ad44aea000000b0063cfb611a4amr106025qvb.4.1692006174129;
Mon, 14 Aug 2023 02:42:54 -0700 (PDT)
X-Received: by 2002:a17:90a:eb08:b0:262:d099:5e0d with SMTP id
j8-20020a17090aeb0800b00262d0995e0dmr2018022pjz.0.1692006173773; Mon, 14 Aug
2023 02:42:53 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 14 Aug 2023 02:42:53 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=88.128.92.182; posting-account=glPZ8goAAADztwA3kVEZPMKXCGydx5DU
NNTP-Posting-Host: 88.128.92.182
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4e1b4490-d61c-4abc-b8a8-30297c952e9en@googlegroups.com>
Subject: Grid Widgets same width and -sticky w
From: alexandru.dadalau@meshparts.de (Alexandru)
Injection-Date: Mon, 14 Aug 2023 09:42:54 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Alexandru - Mon, 14 Aug 2023 09:42 UTC

On https://www.magicsplat.com/tcl-docs/docindex.html there is an example how all buttons in a grid row can have same uniform width.

I would like that all button in the same column have same uniform width.

I could do that with -sticky ew but then the content of each button is centered.

Instead the content should be left aligned (-sticky e).

Is there a trick how to do this?

Thanks
Alexandru

Re: Grid Widgets same width and -sticky w

<a0b9e6de-a933-4a75-ac98-7aa3bd5571ean@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a37:bdc7:0:b0:76c:d577:4105 with SMTP id n190-20020a37bdc7000000b0076cd5774105mr97188qkf.0.1692009430087;
Mon, 14 Aug 2023 03:37:10 -0700 (PDT)
X-Received: by 2002:a17:903:22ce:b0:1b8:a555:3865 with SMTP id
y14-20020a17090322ce00b001b8a5553865mr3988624plg.6.1692009429800; Mon, 14 Aug
2023 03:37:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Mon, 14 Aug 2023 03:37:09 -0700 (PDT)
In-Reply-To: <4e1b4490-d61c-4abc-b8a8-30297c952e9en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=88.128.92.182; posting-account=glPZ8goAAADztwA3kVEZPMKXCGydx5DU
NNTP-Posting-Host: 88.128.92.182
References: <4e1b4490-d61c-4abc-b8a8-30297c952e9en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a0b9e6de-a933-4a75-ac98-7aa3bd5571ean@googlegroups.com>
Subject: Re: Grid Widgets same width and -sticky w
From: alexandru.dadalau@meshparts.de (Alexandru)
Injection-Date: Mon, 14 Aug 2023 10:37:10 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1712
 by: Alexandru - Mon, 14 Aug 2023 10:37 UTC

Alexandru schrieb am Montag, 14. August 2023 um 11:42:57 UTC+2:
> On https://www.magicsplat.com/tcl-docs/docindex.html there is an example how all buttons in a grid row can have same uniform width.
>
> I would like that all button in the same column have same uniform width.
>
> I could do that with -sticky ew but then the content of each button is centered.
>
> Instead the content should be left aligned (-sticky e).
>
> Is there a trick how to do this?
>
> Thanks
> Alexandru

Correction:
Instead the content should be left aligned (-sticky w).

Re: Grid Widgets same width and -sticky w

<slrnudk3sg.qko8.avl@logic.at>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: avl@logic.at (Andreas Leitgeb)
Newsgroups: comp.lang.tcl
Subject: Re: Grid Widgets same width and -sticky w
Date: Mon, 14 Aug 2023 11:27:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <slrnudk3sg.qko8.avl@logic.at>
References: <4e1b4490-d61c-4abc-b8a8-30297c952e9en@googlegroups.com>
<a0b9e6de-a933-4a75-ac98-7aa3bd5571ean@googlegroups.com>
Reply-To: avl@logic.at
Injection-Date: Mon, 14 Aug 2023 11:27:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b6d6ea91e873e2cc97c69a059783a1ce";
logging-data="2425313"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199fvGKB7VCLEzewxKoKOp0"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:ZsVvZm9wKpULtEvhu/H3+C4UMbU=
 by: Andreas Leitgeb - Mon, 14 Aug 2023 11:27 UTC

Alexandru <alexandru.dadalau@meshparts.de> wrote:
> Alexandru schrieb am Montag, 14. August 2023 um 11:42:57 UTC+2:
>> On https://www.magicsplat.com/tcl-docs/docindex.html there is an example how all buttons in a grid row can have same uniform width.
>> I would like that all button in the same column have same uniform width.
>> I could do that with -sticky ew but then the content of each button is centered.
>> Instead the content should be left aligned (-sticky e).
>> Is there a trick how to do this?
> Correction:
> Instead the content should be left aligned (-sticky w).

Maybe you're looking for button's " -anchor w " ?
(for grid, you still need -sticky nsew or ew)

Re: Grid Widgets same width and -sticky w

<d3270eb8-0750-4fb8-bdb5-96b951156c25n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:622a:18a7:b0:403:a063:3ae5 with SMTP id v39-20020a05622a18a700b00403a0633ae5mr114074qtc.10.1692043451428;
Mon, 14 Aug 2023 13:04:11 -0700 (PDT)
X-Received: by 2002:a17:90a:fe14:b0:268:3f14:82ae with SMTP id
ck20-20020a17090afe1400b002683f1482aemr2336376pjb.0.1692043450838; Mon, 14
Aug 2023 13:04:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 14 Aug 2023 13:04:09 -0700 (PDT)
In-Reply-To: <slrnudk3sg.qko8.avl@logic.at>
Injection-Info: google-groups.googlegroups.com; posting-host=88.128.92.72; posting-account=glPZ8goAAADztwA3kVEZPMKXCGydx5DU
NNTP-Posting-Host: 88.128.92.72
References: <4e1b4490-d61c-4abc-b8a8-30297c952e9en@googlegroups.com>
<a0b9e6de-a933-4a75-ac98-7aa3bd5571ean@googlegroups.com> <slrnudk3sg.qko8.avl@logic.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d3270eb8-0750-4fb8-bdb5-96b951156c25n@googlegroups.com>
Subject: Re: Grid Widgets same width and -sticky w
From: alexandru.dadalau@meshparts.de (Alexandru)
Injection-Date: Mon, 14 Aug 2023 20:04:11 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Alexandru - Mon, 14 Aug 2023 20:04 UTC

Andreas Leitgeb schrieb am Montag, 14. August 2023 um 13:27:17 UTC+2:
> Alexandru <alexandr...@meshparts.de> wrote:
> > Alexandru schrieb am Montag, 14. August 2023 um 11:42:57 UTC+2:
> >> On https://www.magicsplat.com/tcl-docs/docindex.html there is an example how all buttons in a grid row can have same uniform width.
> >> I would like that all button in the same column have same uniform width.
> >> I could do that with -sticky ew but then the content of each button is centered.
> >> Instead the content should be left aligned (-sticky e).
> >> Is there a trick how to do this?
> > Correction:
> > Instead the content should be left aligned (-sticky w).
> Maybe you're looking for button's " -anchor w " ?
> (for grid, you still need -sticky nsew or ew)

Yes! That's it. Here is a demo below.
All 3 buttons have same lenght and the text is left aligned.

ttk::button .b -style Toolbutton -text "Foo"
ttk::button .e -style Toolbutton -text "Foo Foo"
ttk::button .l -style Toolbutton -text "Foo Foo Foo"

grid .b -sticky ew
grid .e -sticky ew
grid .l -sticky ew

grid anchor .b w
grid anchor .e w
grid anchor .l w

Re: Grid Widgets same width and -sticky w

<ygajztwoff3.fsf@akutech.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralfixx@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Re: Grid Widgets same width and -sticky w
Date: Tue, 15 Aug 2023 10:53:04 +0200
Lines: 46
Message-ID: <ygajztwoff3.fsf@akutech.de>
References: <4e1b4490-d61c-4abc-b8a8-30297c952e9en@googlegroups.com>
<a0b9e6de-a933-4a75-ac98-7aa3bd5571ean@googlegroups.com>
<slrnudk3sg.qko8.avl@logic.at>
<d3270eb8-0750-4fb8-bdb5-96b951156c25n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net gKHCCXzImt1GB0hb+LuPrADfhFsubXeGDqH0RRCg4PLrb2KyY=
Cancel-Lock: sha1:wB0SG5n4vcT1KqCl90wz4ItKHQY= sha1:GRdZXvyc1DrDT3h3o7vQBVr+l8I= sha256:62tJv8rbJGMghFYruBRM5KGrC7LaKHAU9bS31rNeTbM=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
 by: Ralf Fassel - Tue, 15 Aug 2023 08:53 UTC

* Alexandru <alexandru.dadalau@meshparts.de>
| Andreas Leitgeb schrieb am Montag, 14. August 2023 um 13:27:17 UTC+2:
| > Alexandru <alexandr...@meshparts.de> wrote:
| > > Instead the content should be left aligned (-sticky w).
| > Maybe you're looking for button's " -anchor w " ?
| > (for grid, you still need -sticky nsew or ew)
>
| Yes! That's it. Here is a demo below.
| All 3 buttons have same lenght and the text is left aligned.
>
| ttk::button .b -style Toolbutton -text "Foo"
| ttk::button .e -style Toolbutton -text "Foo Foo"
| ttk::button .l -style Toolbutton -text "Foo Foo Foo"
>
| grid .b -sticky ew
| grid .e -sticky ew
| grid .l -sticky ew
>
| grid anchor .b w
| grid anchor .e w
| grid anchor .l w

I *think* that 'grid anchor' does something different than Andreas
suggested.

Andreas suggested to use the -anchor option of the ttk TButton style (he
posted for 'button', but since you're using a 'ttk::button', you need to
use the option with the same name of the ttk::style):

# only specific buttons should get anchor w, so create a separate style for it:
ttk::style configure W.TButton -anchor w

# use that style with the specific buttons
ttk::button .b -style Toolbutton -text "Foo" -style W.TButton
ttk::button .e -style Toolbutton -text "Foo Foo" -style W.TButton
ttk::button .l -style Toolbutton -text "Foo Foo Foo" -style W.TButton

grid .b -sticky ew
grid .e -sticky ew
grid .l -sticky ew

Compare the L&F of that to your code: on my system (Linux, tk8.6) with
your code the relief of the buttons is missing.

HTH
R'

Re: Grid Widgets same width and -sticky w

<ygafs4kof9s.fsf@akutech.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralfixx@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Re: Grid Widgets same width and -sticky w
Date: Tue, 15 Aug 2023 10:56:15 +0200
Lines: 11
Message-ID: <ygafs4kof9s.fsf@akutech.de>
References: <4e1b4490-d61c-4abc-b8a8-30297c952e9en@googlegroups.com>
<a0b9e6de-a933-4a75-ac98-7aa3bd5571ean@googlegroups.com>
<slrnudk3sg.qko8.avl@logic.at>
<d3270eb8-0750-4fb8-bdb5-96b951156c25n@googlegroups.com>
<ygajztwoff3.fsf@akutech.de>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net 96NEDQuYy9idqs5glmDh4Q02AgEGgLVJauanNnB1fimDY8as4=
Cancel-Lock: sha1:uqmuch0NWvnR/7juyuU0UPucZ4E= sha1:xtpLhc8/RCqQWAXeltimjYXlke0= sha256:XzEJmyBRZngec6hzeyEn96r3MkiRPkL3rDHRoFe25TA=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
 by: Ralf Fassel - Tue, 15 Aug 2023 08:56 UTC

* Ralf Fassel <ralfixx@gmx.de>
| ttk::button .b -style Toolbutton -text "Foo" -style W.TButton

Ah, just spotted that you're using a separate Toolbutton style anyway,
so just do

ttk::style configure Toolbutton -anchor w

and you should be done with your code.

R'

Re: Grid Widgets same width and -sticky w

<9a487b4b-443a-47ab-9f6c-4e9704c2b0b4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:6214:18cb:b0:63f:a7c8:a711 with SMTP id cy11-20020a05621418cb00b0063fa7c8a711mr8628qvb.8.1692167040539;
Tue, 15 Aug 2023 23:24:00 -0700 (PDT)
X-Received: by 2002:a63:3fc5:0:b0:563:dced:3f3a with SMTP id
m188-20020a633fc5000000b00563dced3f3amr218926pga.0.1692167040019; Tue, 15 Aug
2023 23:24:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Tue, 15 Aug 2023 23:23:59 -0700 (PDT)
In-Reply-To: <ygafs4kof9s.fsf@akutech.de>
Injection-Info: google-groups.googlegroups.com; posting-host=88.128.92.187; posting-account=glPZ8goAAADztwA3kVEZPMKXCGydx5DU
NNTP-Posting-Host: 88.128.92.187
References: <4e1b4490-d61c-4abc-b8a8-30297c952e9en@googlegroups.com>
<a0b9e6de-a933-4a75-ac98-7aa3bd5571ean@googlegroups.com> <slrnudk3sg.qko8.avl@logic.at>
<d3270eb8-0750-4fb8-bdb5-96b951156c25n@googlegroups.com> <ygajztwoff3.fsf@akutech.de>
<ygafs4kof9s.fsf@akutech.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9a487b4b-443a-47ab-9f6c-4e9704c2b0b4n@googlegroups.com>
Subject: Re: Grid Widgets same width and -sticky w
From: alexandru.dadalau@meshparts.de (Alexandru)
Injection-Date: Wed, 16 Aug 2023 06:24:00 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Alexandru - Wed, 16 Aug 2023 06:23 UTC

Ralf Fassel schrieb am Dienstag, 15. August 2023 um 10:56:20 UTC+2:
> * Ralf Fassel <ral...@gmx.de>
> | ttk::button .b -style Toolbutton -text "Foo" -style W.TButton
> Ah, just spotted that you're using a separate Toolbutton style anyway,
> so just do
>
> ttk::style configure Toolbutton -anchor w
>
> and you should be done with your code.
>
> R'
Indeed, my code did work but only as it is. Ported in to the application, the result was nil.
With
ttk::style configure W.TButton -anchor w
I get the wanted result.

Many thanks for the help.


devel / comp.lang.tcl / Grid Widgets same width and -sticky w

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor