Skip to content
Tcl Source Code Artifact [97dd723502]
Login

Artifact [97dd723502]

Artifact 97dd72350201452f73858da147c3160510ada3ae:

Ticket change [97dd723502] - New ticket [3565164fffffffff|3565164fff] <i>bind&lt;ButtonRelease-1&gt; doesnt have same behavior on windows</i>. by sunblackshine on 2012-09-06 02:41:07.
D 2012-09-06T02:41:07
J assignee nobody
J cmimetype text/plain
J comment I\swrite\sa\sxml\slayout\sfeature\sfor\smy\swork,\srecently.\sAnd\sI\swant\sbind\sa\sradiobutton\sor\scheckbutton\sclick\sevent\son\sa\smethod,\sbut\sdo\snot\saffect\s"command"\sconfigure\soption.\nso\sI\suse\sthe\sEvents\sand\sBindings,\sI\swrite\sit\slike\sthis\swidget.bind("<ButtonRelease-1>",\slambda\sevent:\sself.enable_toggle(data))\nand\s\n\s\s\s\sdef\senable_toggle(self,\swidget):\n\s\s\s\s\s\s\sprint\swidget_value_map[widget].get()\s#\sthis\swill\sget\sthe\swidget's\svariable\sand\sget\sit\svalue.\n\non\slinux\splatform,\sthe\s<ButtonRelease-1>\sevent\swill\sbe\scalled\safter\svariable\schange,\sso\sI\sget\sthe\scorrect\svalue\sin\senable_toggle\nbut\son\swindows\splatform,\sthe\sevent\swill\sbe\scalled\sbefore\svariable\schange,\sso\sI\sget\sthe\swrong\svalue.\n\nversion:(python\sversion\s\s2.7.3)\nLinux:\n>>>\sTkinter.TkVersion\n8.5\n>>>\sTkinter.TclVersion\n8.5\nWindows:\n>>>\sTkinter.TkVersion\n8.5\n>>>\sTkinter.TclVersion\n8.5\n\n\nI\swrte\sa\ssimple\scode(attachment)\sto\sshow\sthis\sbug.\sI\swant\sthe\scode\shave\ssame\sresult\son\slinux\sand\swindows,\sbut\sit\sdoesnt.\n\nBTW:\sIs\sthere\sa\sway\sto\sbind\smultiple\smethod\sto\san\sbutton\sclick\sevent?\sIf\sa\sbetter\sone\splease\stell\sme.\sThank\syou.\smailto:\[email protected]
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter sunblackshine
J subsystem None
J title bind<ButtonRelease-1>\sdoesnt\shave\ssame\sbehavior\son\swindows
J type Bug
K 3565164fffffffffffffffffffffffffffffffff
U sunblackshine
Z 609c516e54b8083fb0a4a907d30932ca