Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Civilization is the limitless multiplication of unnecessary necessities. -- Mark Twain


comp / comp.lang.tcl / Re: ttk::style: how to get the default font of a ttk::labelframe?

SubjectAuthor
* ttk::style: how to get the default font of a ttk::labelframe?Ralf Fassel
`* Re: ttk::style: how to get the default font of a ttk::labelframe?Emiliano
 `- Re: ttk::style: how to get the default font of a ttk::labelframe?Ralf Fassel

1
Subject: ttk::style: how to get the default font of a ttk::labelframe?
From: Ralf Fassel
Newsgroups: comp.lang.tcl
Date: Mon, 6 May 2024 10:18 UTC
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralfixx@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: ttk::style: how to get the default font of a ttk::labelframe?
Date: Mon, 06 May 2024 12:18:39 +0200
Lines: 30
Message-ID: <yga4jbbtf9c.fsf@akutech.de>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net vGj5Ksx6Sk7RI1gOB6fSMwx/RIcudbEIgd/IXctAkimh5GoMI=
Cancel-Lock: sha1:DQ09GSGl4+xXobQyvIvNT6QCbvk= sha1:tQrOjXOA7Wn8+y/lXtRxtxj8ynw= sha256:IVLia+fbxq/RJsvDyC/W1Hiv1k3GC8bO1729R8WeMiE=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
View all headers

Linux and Windows, tk 8.6.14

Consider two labelframes:

# using the "built-in" label
ttk::style configure TLabelframe.Label -foreground blue
pack [ttk::labelframe .lf1 -text "Labelframe 1"]
pack [button .lf1.b -text Btn1]

# using extra label widget as label
pack [ttk::labelframe .lf2 ]
label .lf2.lbl -text "Labelframe 2"
.lf2 configure -labelwidget .lf2.lbl
pack [button .lf2.b -text Btn2]

=> How can I make the label of the second labelframe have the same font
as the first? The color is readily available (since I set it myself),
but I don't find any introspection for the *default* font itself in
ttk::style:

% ttk::style configure TLabelframe.Label
[nothing]

I *can* configure the font via
ttk::style configure TLabelframe.Label -font {Helvetica 16}

but I'd like to use the _default_ whatever it is on the different platforms.

R'

Subject: Re: ttk::style: how to get the default font of a ttk::labelframe?
From: Emiliano
Newsgroups: comp.lang.tcl
Organization: A noiseless patient Spider
Date: Mon, 6 May 2024 12:18 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: emil.g@example.invalid (Emiliano)
Newsgroups: comp.lang.tcl
Subject: Re: ttk::style: how to get the default font of a ttk::labelframe?
Date: Mon, 6 May 2024 09:18:45 -0300
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <20240506091845.b739e7a22ef1c1b4757c1c8d@example.invalid>
References: <yga4jbbtf9c.fsf@akutech.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 06 May 2024 14:18:47 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="38e52e01d103028a0c36c1b3935da694";
logging-data="2692242"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/H1/tASZrJYfpMQ99AF724P2oDRRGoU/g="
Cancel-Lock: sha1:ShPH+pVpDijBsvdmJD/J2nLrp68=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
View all headers

On Mon, 06 May 2024 12:18:39 +0200
Ralf Fassel <ralfixx@gmx.de> wrote:

> Linux and Windows, tk 8.6.14
>
> Consider two labelframes:
>
> # using the "built-in" label
> ttk::style configure TLabelframe.Label -foreground blue
> pack [ttk::labelframe .lf1 -text "Labelframe 1"]
> pack [button .lf1.b -text Btn1]
>
> # using extra label widget as label
> pack [ttk::labelframe .lf2 ]
> label .lf2.lbl -text "Labelframe 2"
> .lf2 configure -labelwidget .lf2.lbl
> pack [button .lf2.b -text Btn2]
>
>
> => How can I make the label of the second labelframe have the same font
> as the first? The color is readily available (since I set it myself),
> but I don't find any introspection for the *default* font itself in
> ttk::style:
>
> % ttk::style configure TLabelframe.Label
> [nothing]
>
> I *can* configure the font via
> ttk::style configure TLabelframe.Label -font {Helvetica 16}
>
> but I'd like to use the _default_ whatever it is on the different platforms.
>
> R'

On my machine (X11)

% ttk::style lookup TLabelframe -font
TkDefaultFont

Regards
--
Emiliano

Subject: Re: ttk::style: how to get the default font of a ttk::labelframe?
From: Ralf Fassel
Newsgroups: comp.lang.tcl
Date: Mon, 6 May 2024 12:31 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralfixx@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Re: ttk::style: how to get the default font of a ttk::labelframe?
Date: Mon, 06 May 2024 14:31:16 +0200
Lines: 20
Message-ID: <ygazft3rujv.fsf@akutech.de>
References: <yga4jbbtf9c.fsf@akutech.de>
<20240506091845.b739e7a22ef1c1b4757c1c8d@example.invalid>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net Zq3m1ipsrtxzaKVRXA7QrwNqcJmu1yMt5gtFQIXXvNiNjJDYs=
Cancel-Lock: sha1:IGx1+9lQQUASVV1jwEe3h85IxZ0= sha1:JJ0jZ0WCsjDB/ZdpsRkmsXd3n5I= sha256:gGSAJcuG0cR0nnmfkDj5MyS71O9BObirFFRhnD/B+2E=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
View all headers

* Emiliano <emil.g@example.invalid>
| On Mon, 06 May 2024 12:18:39 +0200
| Ralf Fassel <ralfixx@gmx.de> wrote:
--<snip-snip>--
| > => How can I make the label of the second labelframe have the same font
| > as the first? The color is readily available (since I set it myself),
| > but I don't find any introspection for the *default* font itself in
| > ttk::style:
--<snip-snip>--
>
| On my machine (X11)
>
| % ttk::style lookup TLabelframe -font
| TkDefaultFont

I honestly swear that the 'lookup' section in the ttk::style manpage was
not there when I checked it 2 hours ago...

TNX ;-)
R'

1

rocksolid light 0.9.8
clearnet tor