classification
Title: Problem in tkinter button widget
Type: behavior Stage: resolved
Components: Tkinter Versions: Python 3.9
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: a.h.misaghi, epaine, serhiy.storchaka
Priority: normal Keywords:

Created on 2021-07-23 05:36 by a.h.misaghi, last changed 2021-07-23 17:31 by serhiy.storchaka. This issue is now closed.

Files
File name Uploaded Description Edit
test.tar.gz a.h.misaghi, 2021-07-23 05:36 Exmple of the wrong behavior
Messages (3)
msg398031 - (view) Author: Seyed Amirhossein Misaghi (a.h.misaghi) Date: 2021-07-23 05:36
Hello
The piece of code has false behavior. When click the button, the relief changes to tk.SUNKEN. I think this is a wrong behavior.
Thanks
msg398081 - (view) Author: E. Paine (epaine) * Date: 2021-07-23 17:20
Sadly, there is no `activerelief` option. The Tk man pages note the following:
> A button's relief is changed to sunken whenever mouse button 1 is pressed over the button, and the relief is restored to its original value when button 1 is later released. [https://www.tcl.tk/man/tcl8.6/TkCmd/button.html#M18]

You can also see in the source code that sunken is hard-coded:
https://github.com/tcltk/tk/blob/1802b8a5d6807bdab6ac703f48e6e6bf07970266/library/button.tcl#L227

Personally, I think changing the relief to 'sunken' on click is an important feature, since a user needs feedback on when they've clicked the button. Thank you for reporting this issue, but I think it should be closed as either 'not a bug' or 'third party'.
msg398083 - (view) Author: Seyed Amirhossein Misaghi (a.h.misaghi) Date: 2021-07-23 17:30
Thanks for your response
History
Date User Action Args
2021-07-23 17:31:50serhiy.storchakasetresolution: not a bug
2021-07-23 17:30:08a.h.misaghisetstatus: open -> closed
stage: resolved
2021-07-23 17:30:00a.h.misaghisetmessages: + msg398083
2021-07-23 17:20:12epainesetnosy: + serhiy.storchaka, epaine
messages: + msg398081
2021-07-23 05:36:52a.h.misaghicreate