<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>Ciao ho problemi su window 7 </DIV>
<DIV>non mi cambia il colore background ma rimane bianco come mai <IMG
class="wlEmoticon wlEmoticon-sadsmile"
style="BORDER-TOP-STYLE: none; BORDER-BOTTOM-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none"
alt=Triste src="cid:6E622737BD084B0BA99978CCD167D8E8@SaturnHP"></DIV>
<DIV>in un pc dove ho cambiato il tema in window classico funziona ( e che
cacchio <IMG class="wlEmoticon wlEmoticon-sadsmile"
style="BORDER-TOP-STYLE: none; BORDER-BOTTOM-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none"
alt=Triste src="cid:6E622737BD084B0BA99978CCD167D8E8@SaturnHP">)</DIV>
<DIV>segue l’esempio funzionante</DIV>
<DIV>Grazie Gian</DIV>
<DIV> </DIV>
<DIV>import tkinter as tk</DIV>
<DIV>from tkinter import ttk</DIV>
<DIV>def Pressed():</DIV>
<DIV> #print(CasellaTesto.cget('state')) SOLO PER DEBUG</DIV>
<DIV> Stato=str(CasellaTesto.cget('state'))</DIV>
<DIV> #print(Stato) SOLO PER DEBUG</DIV>
<DIV> </DIV>
<DIV> if Stato=='normal':</DIV>
<DIV>
CasellaTesto.config(state='readonly')</DIV>
<DIV> else:</DIV>
<DIV>
CasellaTesto.config(state='normal')</DIV>
<DIV> </DIV>
<DIV>Fin = tk.Tk()</DIV>
<DIV>ST = ttk.Style()</DIV>
<DIV>ST.configure('EntryStyle.TEntry', fieldbackground='yellow')</DIV>
<DIV>ST.map('EntryStyle.TEntry',fieldbackground=[('readonly','cyan')])</DIV>
<DIV>CasellaTesto = ttk.Entry(Fin, style='EntryStyle.TEntry')</DIV>
<DIV>CasellaTesto.grid(column=0, row=0)</DIV>
<DIV>But=ttk.Button(Fin,text='modifica',command=Pressed)</DIV>
<DIV>But.grid(column=0,row=1)</DIV>
<DIV>Fin.mainloop()</DIV></DIV></DIV>
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
<tr>
<td style='border:none;padding:0px 15px 0px 8px'>
<a href="https://www.avast.com/antivirus">
<img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" alt="Avast logo" />
</a>
</td>
<td>
<p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
<br><a href="https://www.avast.com/antivirus">www.avast.com</a>
</p>
</td>
</tr>
</table>
<br />
</BODY></HTML>