1

I am using Tkinter in ArcMap Add-in python code. Tkinter UI is opening well but then it closes or crashes ArcMap.

I am using the below code.

import arcpy
import pythonaddins
from Tkinter import *
import tkMessageBox

class ButtonClass1(object):
    """Implementation for Testing_addin.button (Button)"""
    def __init__(self):
        self.enabled = True
        self.checked = False

    def onClick(self):

        root = Tk()
        lbl = Label(root, text = "Hello")
        lbl.pack()
        btn = Button(root, text = "OK")
        root.mainloop()

        pass

Thank you!

  • Does this answer your question? [trying-to-use-tkinter-to-open-dialog-box-in-arcmap](https://gis.stackexchange.com/questions/144175) – stovfl May 16 '20 at 14:36

0 Answers0