tkSimpleDialog fails

  • Thread starter Gheorghe Postelnicu
  • Start date
G

Gheorghe Postelnicu

Hi,

I am using Python to develop a front-end GUI using Tk. I would need to
use some of the tkSimpleDialog widgets, but they seem to fail. As far
as I could tell, this happens because my application also uses VTK, so
I have to use the root.withdraw() line

root = Tkinter.Tk()
root.withdraw()

app = Application(root,700,700)

root.mainloop()


Hence, when I call tkSimpleDialog.askfloat, here's what I get:


Traceback (most recent call last):
File "pyScout.py", line 426, in SelectRegion
spacing = tkSimpleDialog.askfloat("Profile spacing","Input spacing
value")
File "/usr/lib64/python2.3/lib-tk/tkSimpleDialog.py", line 271, in askfloat
d = _QueryFloat(title, prompt, **kw)
File "/usr/lib64/python2.3/lib-tk/tkSimpleDialog.py", line 179, in __init__
Dialog.__init__(self, parent, title)
File "/usr/lib64/python2.3/lib-tk/tkSimpleDialog.py", line 64, in __init__
self.grab_set()
File "/usr/lib64/python2.3/lib-tk/Tkinter.py", line 521, in grab_set
self.tk.call('grab', 'set', self._w)
_tkinter.TclError: grab failed: window not viewable


Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top