TKinter ttk combobox Focusout event
Massimo POZZONI via Tkinter-discuss <[email protected]> Tue, 20 Sep 2022 08:05:36 +0000
| Newsgroups | gmane.comp.python.tkinter |
|---|---|
| Message-ID | <PAXPR10MB49779BF5A9209312AE6C711D8C4C9@PAXPR10MB4977.EURPRD10.PROD.OUTLOOK.COM> |
--===============0220398915137560299==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_PAXPR10MB49779BF5A9209312AE6C711D8C4C9PAXPR10MB4977EURP_"
--_000_PAXPR10MB49779BF5A9209312AE6C711D8C4C9PAXPR10MB4977EURP_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
I find an issue with the Combobox events:
The <FocusOut> event is triggered also when the drop-down menu list is open=
ed. (Basically it works as the FocusOut of the associated Entry, not of the=
ComboBox)
The <<ComboboxSelected>> event is triggered only when a selection is done f=
rom the list, but not if something is written inside the associated Entry.
My problem is that I need an event that is triggered when the overall combo=
x widget is left,
which is not the FocusOut, because when I open the drop-down menu I am stil=
l using the widget,
and it is not the <<ComboboxSelected>> because if I left the widget after w=
riting inside the associated Entry, the event is not triggered because no s=
election from list happens.
Is there any way to have an event that is triggered when the overall combob=
ox is left, but not when the drop-down list is opened?
Thanks
Massimo
ST Restricted
--_000_PAXPR10MB49779BF5A9209312AE6C711D8C4C9PAXPR10MB4977EURP_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Arial",sans-serif;
color:#002052;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"#0563C1" vlink=3D"#954F72" style=3D"word-wrap:=
break-word">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052">I find an issue with the Combobox event=
s:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052">The <FocusOut> event is triggered=
also when the drop-down menu list is opened. (Basically it works as the Fo=
cusOut of the associated Entry, not of the ComboBox)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052">The <<ComboboxSelected>> ev=
ent is triggered only when a selection is done from the list, but not if so=
mething is written inside the associated Entry.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052">My problem is that I need an event that=
is triggered when the overall combox widget is left,
<o:p></o:p></span></p>
<p class=3D"MsoNormal" style=3D"text-indent:.5in"><span style=3D"font-size:=
10.0pt;font-family:"Arial",sans-serif;color:#002052">which is not=
the FocusOut, because when I open the drop-down menu I am still using the =
widget,
<o:p></o:p></span></p>
<p class=3D"MsoNormal" style=3D"text-indent:.5in"><span style=3D"font-size:=
10.0pt;font-family:"Arial",sans-serif;color:#002052">and it is no=
t the <<ComboboxSelected>> because if I left the widget after w=
riting inside the associated Entry, the event is not triggered
because no selection from list happens.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052">Is there any way to have an event that =
is triggered when the overall combobox is left, but not when the drop-down =
list is opened?<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052">Thanks<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052">Massimo<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial",sans-serif;color:#002052"><o:p> </o:p></span></p>
<br>
<p class=3D"msipfooter64eda7a5" align=3D"Right" style=3D"margin:0"><span st=
yle=3D"font-size:12.0pt;font-family:Arial;color:#FF0000">ST Restricted</spa=
n></p>
</div>
</body>
</html>
--_000_PAXPR10MB49779BF5A9209312AE6C711D8C4C9PAXPR10MB4977EURP_--
--===============0220398915137560299==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Tkinter-discuss mailing list
[email protected]
https://mail.python.org/mailman/listinfo/tkinter-discuss
--===============0220398915137560299==--