askstring Window to the top under Windows

jim-on-linux inq1ltd at verizon.net
Wed Mar 7 15:58:55 CET 2007


On Wednesday 07 March 2007 05:05, iwl wrote:
> On 7 Mrz., 02:49, jim-on-linux 
<inq1... at verizon.net> wrote:
> > On Tuesday 06 March 2007 08:13, iwl wrote:
> > > Hi,
> > >
> > > I tryed askstring to input some text in my
> > > script, but some ugly empty Window appears
> > > with the Input-Window behind and all
> > > together behind my Console showing my
> > > script. So all have to brought to the top
> > > first by the user - very unconfortable
> >
> > By default
> > tk will open a root window.
>
> Is this default changeable befor askstring?

Here is an example of a simple button that will 
open a tkSimpleDialog box
======

from Tkinter import *
import tkSimpleDialog
from tkSimpleDialog import askfloat

root = Tk()  ## this is the default window
vlab = Button( root, text= 'Click here to Open 
            Dialog',
            width = 20, height = 2,
            bg = 'yellow',
       command =(lambda:   askfloat( 'Entery',
       'Enter credit card number') ) )
vlab.grid()
mainloop()

jim-on-linux
http://www.inqvista.com



More information about the Python-list mailing list