• A ttk::style question

    From Helmut Giese@hgiese@ratiosoft.com to comp.lang.tcl on Mon Jun 9 00:44:18 2025
    From Newsgroup: comp.lang.tcl

    Hello out there,
    I want to configure the font of a ttk::radiobutton - but how?
    I found 'ttk::style element names', but the call returned a list
    starting (when sorted) with 'Combobox.background' and ending with 'Vertical.Scrollbar.uparrow' - but no mention of either 'radiobutton'
    or 'label'.
    I am out of ideas. Any help will be greatly appreciated.
    Helmut
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Schelte@nospam@wanadoo.nl to comp.lang.tcl on Mon Jun 9 01:04:56 2025
    From Newsgroup: comp.lang.tcl

    On 09/06/2025 00:44, Helmut Giese wrote:
    I want to configure the font of a ttk::radiobutton - but how?

    Assuming you don't want all your radiobuttons to have the special font,
    invent a name for a style that inherits from the normal style for a radiobutton; TRadiobutton. Configure the font for that derived style.
    Then use that style for your radiobutton:

    ttk::style configure Fixed.TRadiobutton -font TkFixedFont
    ttk::radiobutton .b -style Fixed.TRadiobutton -text Hello


    Schelte.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Helmut Giese@hgiese@ratiosoft.com to comp.lang.tcl on Mon Jun 9 01:51:40 2025
    From Newsgroup: comp.lang.tcl

    Hi Schelte,
    you saved my day, many thanks (and so fast, too).
    Maybe one more question:
    Is there some source (tutorial, collection of texts, or similar)
    where one could learn the basics of working with styles? Anthing?
    Thanks again
    Helmut

    On 09/06/2025 00:44, Helmut Giese wrote:
    I want to configure the font of a ttk::radiobutton - but how?

    Assuming you don't want all your radiobuttons to have the special font, >invent a name for a style that inherits from the normal style for a >radiobutton; TRadiobutton. Configure the font for that derived style.
    Then use that style for your radiobutton:

    ttk::style configure Fixed.TRadiobutton -font TkFixedFont
    ttk::radiobutton .b -style Fixed.TRadiobutton -text Hello


    Schelte.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From nemethi@csaba.nemethi@t-online.de to comp.lang.tcl on Mon Jun 9 13:20:24 2025
    From Newsgroup: comp.lang.tcl

    Am 09.06.25 um 01:51 schrieb Helmut Giese:
    Hi Schelte,
    you saved my day, many thanks (and so fast, too).
    Maybe one more question:
    Is there some source (tutorial, collection of texts, or similar)
    where one could learn the basics of working with styles? Anthing?
    Thanks again
    Helmut

    On 09/06/2025 00:44, Helmut Giese wrote:
    I want to configure the font of a ttk::radiobutton - but how?

    Assuming you don't want all your radiobuttons to have the special font,
    invent a name for a style that inherits from the normal style for a
    radiobutton; TRadiobutton. Configure the font for that derived style.
    Then use that style for your radiobutton:

    ttk::style configure Fixed.TRadiobutton -font TkFixedFont
    ttk::radiobutton .b -style Fixed.TRadiobutton -text Hello


    Schelte.


    See https://tkdocs.com/tutorial/styles.html by Mark Roseman.
    --
    Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Alan Grunwald@nospam.nurdglaw@gmail.com to comp.lang.tcl on Mon Jun 9 12:36:33 2025
    From Newsgroup: comp.lang.tcl

    On 09/06/2025 12:20, nemethi wrote:
    Am 09.06.25 um 01:51 schrieb Helmut Giese:
    Hi Schelte,
    you saved my day, many thanks (and so fast, too).
    Maybe one more question:
    Is there some source (tutorial, collection of  texts, or similar)
    where one could learn the basics of working with styles? Anthing?
    Thanks again
    Helmut

    On 09/06/2025 00:44, Helmut Giese wrote:
    I want to configure the font of a ttk::radiobutton - but how?

    Assuming you don't want all your radiobuttons to have the special font,
    invent a name for a style that inherits from the normal style for a
    radiobutton; TRadiobutton. Configure the font for that derived style.
    Then use that style for your radiobutton:

    ttk::style configure Fixed.TRadiobutton -font TkFixedFont
    ttk::radiobutton .b -style Fixed.TRadiobutton -text Hello


    Schelte.


    See https://tkdocs.com/tutorial/styles.html by Mark Roseman.


    That's great, Csaba, thank you. I've been looking for ages for something
    that explained Ttk styles in a way that was natural to me, and this may
    well be it. Is there any thing similar to explain how to modify layouts? (Assuming it's possible.)

    Alan
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From nemethi@csaba.nemethi@t-online.de to comp.lang.tcl on Mon Jun 9 15:12:40 2025
    From Newsgroup: comp.lang.tcl

    Am 09.06.25 um 13:36 schrieb Alan Grunwald:
    On 09/06/2025 12:20, nemethi wrote:
    Am 09.06.25 um 01:51 schrieb Helmut Giese:
    Hi Schelte,
    you saved my day, many thanks (and so fast, too).
    Maybe one more question:
    Is there some source (tutorial, collection of  texts, or similar)
    where one could learn the basics of working with styles? Anthing?
    Thanks again
    Helmut

    On 09/06/2025 00:44, Helmut Giese wrote:
    I want to configure the font of a ttk::radiobutton - but how?

    Assuming you don't want all your radiobuttons to have the special font, >>>> invent a name for a style that inherits from the normal style for a
    radiobutton; TRadiobutton. Configure the font for that derived style.
    Then use that style for your radiobutton:

    ttk::style configure Fixed.TRadiobutton -font TkFixedFont
    ttk::radiobutton .b -style Fixed.TRadiobutton -text Hello


    Schelte.


    See https://tkdocs.com/tutorial/styles.html by Mark Roseman.


    That's great, Csaba, thank you. I've been looking for ages for something that explained Ttk styles in a way that was natural to me, and this may
    well be it. Is there any thing similar to explain how to modify layouts? (Assuming it's possible.)

    Alan

    If you go to the Wiki page https://wiki.tcl-lang.org/ and type
    "ttk::style layout" into the Search field, you will get a series of
    useful articles about this subject.
    --
    Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From greg@gregor.ebbing@gmx.de to comp.lang.tcl on Mon Jun 9 15:41:19 2025
    From Newsgroup: comp.lang.tcl

    Am 09.06.25 um 01:51 schrieb Helmut Giese:
    Hi Schelte,
    you saved my day, many thanks (and so fast, too).
    Maybe one more question:
    Is there some source (tutorial, collection of texts, or similar)
    where one could learn the basics of working with styles? Anthing?
    Thanks again
    Helmut

    On 09/06/2025 00:44, Helmut Giese wrote:
    I want to configure the font of a ttk::radiobutton - but how?

    Assuming you don't want all your radiobuttons to have the special font,
    invent a name for a style that inherits from the normal style for a
    radiobutton; TRadiobutton. Configure the font for that derived style.
    Then use that style for your radiobutton:

    ttk::style configure Fixed.TRadiobutton -font TkFixedFont
    ttk::radiobutton .b -style Fixed.TRadiobutton -text Hello


    Schelte.


    Hello,

    just the one tutorial already mentioned,
    otherwise a few links to the theme:

    https://tkdocs.com/tutorial/styles.html https://stackoverflow.com/questions/48050219/customize-ttkbutton https://wiki.tcl-lang.org/page/Changing+Widget+Colors



    Manuals
    https://www.tcl-lang.org/man/tcl/TkCmd/ttk_intro.htm https://www.tcl-lang.org/man/tcl/TkCmd/ttk_widget.htm https://www.tcl-lang.org/man/tcl/TkCmd/ttk_style.htm https://www.tcl-lang.org/man/tcl/TkCmd/ttk_image.htm https://www.tcl-lang.org/man/tcl/TkCmd/ttk_vsapi.htm

    older
    https://tktable.sourceforge.net/tile/ https://tktable.sourceforge.net/tile/tile-tcl2004.pdf

    Windows
    https://fossies.org/linux/tk/library/ttk/vistaTheme.tcl https://fossies.org/linux/tk/library/ttk/xpTheme.tcl https://fossies.org/linux/tk/library/ttk/winTheme.tcl

    https://www.tcl.tk/man/tcl8.6/TkCmd/ttk_vsapi.htm https://fossies.org/linux/tk/tests/ttk/vsapi.test

    Deutsch/German (im Buch)
    http://www.tcltk.info/index.html

    greg
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Helmut Giese@hgiese@ratiosoft.com to comp.lang.tcl on Tue Jun 10 03:50:20 2025
    From Newsgroup: comp.lang.tcl

    Hello all,
    I am simply overwhelmed: so many infos - and so much to study :(
    Many thanks to all of you
    Helmut
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Harald Oehlmann@wortkarg3@yahoo.com to comp.lang.tcl on Tue Jun 10 08:08:49 2025
    From Newsgroup: comp.lang.tcl

    Am 10.06.2025 um 03:50 schrieb Helmut Giese:
    Hello all,
    I am simply overwhelmed: so many infos - and so much to study :(
    Many thanks to all of you
    Helmut

    Yes, Helmut,
    15 years ago, I figured out how to change the fonts of all ttk widgets.
    You normally find this info on the wiki widget page ;-)
    Harald
    --- Synchronet 3.21a-Linux NewsLink 1.2