TkinterMapView icon indicating copy to clipboard operation
TkinterMapView copied to clipboard

Error initializing with arguments corner_radius and bg_color

Open alejandroautalan opened this issue 1 year ago • 0 comments

Hello. Error when creating a mapview with arguments corner_radius and bg_color.

Version

tkintermapview==1.14

Test script: mapviewtest.py

import tkinter
import tkintermapview

# create tkinter window
root_tk = tkinter.Tk()
root_tk.geometry(f"{640}x{480}")
root_tk.title("map_view_example.py")

# create map widget
map_widget = tkintermapview.TkinterMapView(root_tk, corner_radius=30, bg_color="red")
map_widget.pack(expand=True, fill="both")
root_tk.mainloop()

Error message:

Traceback (most recent call last):
  File "/home/alejandro/Privado/projects/pygubu-project/issues/designer/mapviewtest.py", line 10, in <module>
    map_widget = tkintermapview.TkinterMapView(root_tk, corner_radius=30, bg_color="red")
  File "/home/alejandro/.local/share/fades/23e7c1fd-ebeb-4f2b-bdd9-3e00791ade44/lib/python3.10/site-packages/tkintermapview/map_widget.py", line 153, in __init__
    self.draw_rounded_corners()
  File "/home/alejandro/.local/share/fades/23e7c1fd-ebeb-4f2b-bdd9-3e00791ade44/lib/python3.10/site-packages/tkintermapview/map_widget.py", line 167, in draw_rounded_corners
    style=tkinter.ARC, tag="corner", width=10, outline=self.bg_color, start=-90)
AttributeError: 'TkinterMapView' object has no attribute 'bg_color'

Regards

alejandroautalan avatar Sep 22 '22 04:09 alejandroautalan