Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button widget is not working as a child to ttk widgets. #19

Closed
Saadmairaj opened this issue Apr 8, 2021 · 0 comments · Fixed by #23
Closed

Button widget is not working as a child to ttk widgets. #19

Saadmairaj opened this issue Apr 8, 2021 · 0 comments · Fixed by #23
Assignees
Labels
bug Something isn't working

Comments

@Saadmairaj
Copy link
Owner

Saadmairaj commented Apr 8, 2021

Describe the bug
The button widget is throwing an error when placed inside of a ttk.frame or any ttk widget as a parent to the tkmacosx Button.

To Reproduce

import tkinter as tk
import tkinter.ttk as ttk
import tkmacosx as tkm

root = tk.Tk()
frame = ttk.Frame(root)
frame.pack()
button = tkm.Button(frame)
button.pack()
root.mainloop()

Expected behavior

Traceback (most recent call last):
  .
  .
  .
  File "/Users/saad/anaconda3/envs/base3.9/lib/python3.9/site-packages/tkmacosx/basewidgets/button_base.py", line 143, in borderless
    if self.cnf.get('bordercolor') == self.master['bg']:
  File "/Users/saad/anaconda3/envs/base3.9/lib/python3.9/tkinter/__init__.py", line 1644, in cget
    return self.tk.call(self._w, 'cget', '-' + key)
_tkinter.TclError: unknown option "-bg"
  • Version: 1.0.0 or below
@Saadmairaj Saadmairaj added the bug Something isn't working label Apr 8, 2021
@Saadmairaj Saadmairaj self-assigned this Apr 8, 2021
@Saadmairaj Saadmairaj linked a pull request May 17, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant