tkSimpleDialog box question............

Suresh Kumar suresh_vsamy at
Wed Jun 18 19:01:21 CEST 2003

An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------

    Anybody know how to place "tkSimpleDialog" at a given user defined location rather than the default one? I am calling "kSimpleDialog" in my application and it always display near to top-left ( say 100,100). But i want to place at center of the screen or somewhere else. How can i do it? My code is given below.

from   Tkinter import *
import Pmw
import tkFont
import tkSimpleDialog

class Test:

    def __init__(self,parent):
      self.myparent = parent
      self.canvas = Canvasself.myparent,width=500,height=500)
      self.canvas.bind('<Button-1>', self.showDialog)

    def showDialog():
        radiotype = 0
        RadioButtonTest.(sefl.myparent,"Radio Test",radiotype) 

class RadioButtonTest(tkSimpleDialog.Dialog):
	def __init__( self, parent,title, filetype) :
		tkSimpleDialog.Dialog.__init__( self, parent, title) = IntVar()
	def body(self, master):
		fType = Frame(master, borderwidth=1, relief=SUNKEN)
		first = Radiobutton(fType,text = " Test1",, value=1)

		second = Radiobutton(fType, text = " Test2",, value=2)
		second.pack(side=TOP, anchor=W)
		fType.pack(side="right", padx=3)

root = Tk()
mytest =  Test(root)

More information about the Python-list mailing list