> Comments : > - Find a way to really have the 'buttonrelease' behavior on buttons > Currently, in the buttonbar of a CW, when we ButtonPress on a button but move the mouse outside of the > button before releasing it, it still activates the button, the normal behavior would be to cancel the click if > the release is done outside of the button. We should maybe do someting like bind <<Button1>> > "handle_button_release %W %X %Y [list command to execute on bind]" > and have the handle_button_release {w x y command } { > if { $x > [winfo width $w] && $y > [winfo height $w] || $x < 0 && $y < 0 } { return } else { uplevel eval > $command } > }
That is already implemented for 'buttons' however those were changed to 'labels' I don't remember the exact reason why, but the comment in the code is: "#Buttons are now labels, to get nicer interface on Mac OS X". However if you want to just reuse the code from buttons and add it to 'labels' you could try just binding the events that you want in the label to the button events. Or you could copy the code and keep the bits you want. Anyway, all the code you want can be found in: button.tcl (...\Tcl\lib\tk8.4). Lio. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Amsn-devel mailing list Amsn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amsn-devel