Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

UNIX is many things to many people, but it's never been everything to anybody.


devel / comp.lang.tcl / Re: Need a work around for a bug with tk_setPalette

SubjectAuthor
* Need a work around for a bug with tk_setPaletteDonald Rozenberg
`- Need a work around for a bug with tk_setPalettesaitology9

1
Need a work around for a bug with tk_setPalette

<3fe4faa0-eceb-4327-961b-4c8ae49ab2bbn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=11836&group=comp.lang.tcl#11836

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:6214:9b0:b0:635:f068:9739 with SMTP id du16-20020a05621409b000b00635f0689739mr65865qvb.9.1689102178235;
Tue, 11 Jul 2023 12:02:58 -0700 (PDT)
X-Received: by 2002:a05:6870:956a:b0:1b0:3bfb:885f with SMTP id
v42-20020a056870956a00b001b03bfb885fmr2637406oal.6.1689102177942; Tue, 11 Jul
2023 12:02:57 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.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, 11 Jul 2023 12:02:57 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=8.39.134.118; posting-account=FxE2oAoAAACLDChqNDEvoUKW4RME9Sjc
NNTP-Posting-Host: 8.39.134.118
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3fe4faa0-eceb-4327-961b-4c8ae49ab2bbn@googlegroups.com>
Subject: Need a work around for a bug with tk_setPalette
From: don.rozenberg@gmail.com (Donald Rozenberg)
Injection-Date: Tue, 11 Jul 2023 19:02:58 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Donald Rozenberg - Tue, 11 Jul 2023 19:02 UTC

Hi,
I am writing a Python GUI generator as a fork of a Tcl program and am up against a hard place because of a bug in tk_setPalette. tk_setPalette overwrites the foreground color of a text widget even when one is specified when the text widget is created. The bug is illustrated by the following code.

"
text .t -background #d9d9d9 -foreground black -relief ridge \
-borderwidth 8 -padx 10 \
-pady 10 -font {Helvetica -18 bold} -width 20 -height 5

button .b -text tk_setPalette \
-command "tk_setPalette background red foreground white"
pack .t .b
..t insert 1.0 "Hello\nWorld\n"
..t insert end "A new line\n"
"

Notice that when the button is selected the background color is not changed but the foreground color is.

I really need a workaround that will preserve the specified foreground color and will appreciate any suggestion.

Re: Need a work around for a bug with tk_setPalette

<u8lre9$38a1e$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=11837&group=comp.lang.tcl#11837

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: saitology9@gmail.com (saitology9)
Newsgroups: comp.lang.tcl
Subject: Re: Need a work around for a bug with tk_setPalette
Date: Wed, 12 Jul 2023 05:23:21 -0400
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <u8lre9$38a1e$1@dont-email.me>
References: <3fe4faa0-eceb-4327-961b-4c8ae49ab2bbn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 12 Jul 2023 09:23:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ca6e85ac46904dbe11c2e2f424aade1d";
logging-data="3418158"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18MDN7OxaNXNMuQkqCcPsiw"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:o8kC1SWc1DQ4BkKN/2EHpfJJDCo=
Content-Language: en-US
In-Reply-To: <3fe4faa0-eceb-4327-961b-4c8ae49ab2bbn@googlegroups.com>
 by: saitology9 - Wed, 12 Jul 2023 09:23 UTC

On 7/11/2023 3:02 PM, Donald Rozenberg wrote:
>
> Notice that when the button is selected the background color is not changed but the foreground color is.
>
> I really need a workaround that will preserve the specified foreground color and will appreciate any suggestion.

Not a bug but a documented feature. I believe tk_palette will not
override widget settings that you have provided explicitly or whose
values are system defaults. This behavior is explained in more detail in
the man page. In summary, for options for which you want tk_palette
settings, do not set widget options explicitly.


devel / comp.lang.tcl / Re: Need a work around for a bug with tk_setPalette

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor