pmw "about" dialog

Sharriff.Aina at med-iq.de Sharriff.Aina at med-iq.de
Tue Oct 16 07:50:40 EDT 2001


Could someone tell me why the about dialog in this code does not show?

I have coded this small app as a test, can someone tell me why the "about
menu does not show?

################## code

import Pmw
from tkFileDialog import askopenfilename
from Tkinter import *

# variables and constants
filepath = ""

# create main application
root = Tk()

# initialise Pmw for use
Pmw.initialise(root)
Pmw.aboutversion('0.5')
Pmw.aboutcopyright('Copyright Sharriff Aina, 2001\nAll rights reserved')
Pmw.aboutcontact('email: test at nowhere.de')

# construct about dialogue
about = Pmw.AboutDialog(root, applicationname = 'test_apllication')
about.withdraw()

# create root frame
appframe = Frame(root, width = 400, height = 550)

# create menu
menubar = Menu(root, border=1)

# create submenu "file"
filemenu = Menu(menubar, tearoff = 0)
filemenu.add_command(label = "Exit", command = root.quit)

#add submenu "file" to mainmenu "menubar"
menubar.add_cascade(label="File", menu=filemenu)

#create submenu "Help"
helpmenu = Menu(menubar, tearoff=0)
helpmenu.add_command(label = "menu1")
helpmenu.add_command(label = "menu2")

# add submenu "Help" to menubar
menubar.add_cascade(label="Help", menu=helpmenu)


def dialogue_about():
....about.show()


#create submenu "About"
aboutmenu = Menu(menubar, tearoff=0)
aboutmenu.add_command(label = "About")
# add submenu "about" to menubar
menubar.add_cascade(label="About", menu=aboutmenu, command =
dialogue_about)

appframe.pack()

# set the title
root.title("testapplication")

#assign root a menubar
root.config(menu=menubar)

root.mainloop()

######################### end code


Thanks so much


Sharriff





More information about the Python-list mailing list