1

I wanted to add "ABOUT" button to a Pythonaddins toolbar the button should display a window that contains both of a text defines the authors and an image about the developer organisation. I followed an example about using Tkinter, as the following adress http://gisstudycenter.blogspot.com.eg/2014/12/how-to-create-graphical-user-interface.html

the script works as shown enter image description here

but immediately the arc crashes enter image description here

The code I used is

from Tkinter import *
import datetime
from array import *

root = Tk()
logo = PhotoImage(file="D:\My Papers\Paper 19 - StandAlone Gis Application\Draft\William_Shakespeare.gif")
w2 = Label(root, image=logo).grid(row=0,column=1)
explanation = """Team Geo Zoner"""
w2 = Label(root, compound = CENTER, fg="Red", bg="black", font="Times 55 bold", text=explanation)
w2.grid(row=0,column=0)

p=str(datetime.datetime.now().isoformat())
texter="Your Heading Goes Here"+str(p);
w3 = Label(root, compound = CENTER, fg="Green", font="Times 20 bold", text=texter)
w3.grid(row=1,column=0)

Parameters = ['Number of Inputs','Number of Ouputs','Number of Processing Parameters','Number of Intermediate data']

r = 2
i=1
for c in Parameters:
    Label(text=c, relief=RIDGE,width=25).grid(row=r,column=0)
    Entry(text="Value", relief=SUNKEN,width=10).grid(row=r,column=1)
    r = r + 1
    i = i + 1

root.title("GISSTUDYroot.title")
root.mainloop()

What is the problem? Is there an alternative in Pythonaddins to display similar messageBox with an image?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
A.Adel Saleh
  • 149
  • 12

1 Answers1

1

PyQT is another GUI builder option, see Q/A below.

Developing GUI in Python for ArcGIS geoprocessing using PyQT/Tkinter/wxPython?

artwork21
  • 35,114
  • 8
  • 66
  • 134
  • Thank you, please add an example of using PyQT to display a GUI if it contains different items (images, scrollbar, text, ...) that would be great – A.Adel Saleh Oct 01 '16 at 05:07