Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ttk::entry change color

26 views
Skip to first unread message

Manfred

unread,
Apr 28, 2019, 8:05:36 AM4/28/19
to
Hi

I'll change the background color from some ttk::entry widgets (not from all)

##example
set nix anix

pack [ttk::entry .en -textvariable nix]
pack [ttk::entry .en2 -textvariable nix -background green]


## dosn't work (background .en2 is standard)


##example 2

ttk::style configure myTEntry -background geen
set nix anix

pack [ttk::entry .en -textvariable nix]
pack [ttk::entry .en2 -textvariable nix -class myTEntry]

## dosn't work (background .en2 is standard)

Who can I change the backgrond color from some ttk::entry widgets ?


regards

Manfred








Francois Vogel

unread,
Apr 28, 2019, 9:00:51 AM4/28/19
to
Le 28/04/2019 à 14:05, Manfred a écrit :
> ##example 2
>
> ttk::style configure myTEntry -background geen
> set nix anix
>
> pack [ttk::entry .en -textvariable nix]
> pack [ttk::entry .en2 -textvariable nix -class myTEntry]
>
> ## dosn't work (background .en2 is standard)

Did you check out

https://wiki.tcl-lang.org/page/Changing+Widget+Colors

?

F.

Manfred

unread,
Apr 28, 2019, 1:24:24 PM4/28/19
to
Yes.

But in this case I change the background from all ttk::entry.
I'll only change the background from widget .en2.

regards

Manfred

Am 28.04.19 um 15:00 schrieb Francois Vogel:

Manfred

unread,
Apr 28, 2019, 1:31:54 PM4/28/19
to
Now I found the solution on:

https://wiki.tcl-lang.org/page/Ttk

regards

Manfred

Am 28.04.19 um 19:24 schrieb Manfred:
0 new messages