gui - wait for dialog to close

A

Ajay

hi!

i have an application which requires a username
what i am trying to do is when the application runs, a dialog window
appears which prompts the user for his name. once thats entered, the
dialog box is destroyed, the username stored and the application gui is
drawn

i tried doing this by adding a wait_window call in my application GUI's
init.
the idea was to suspend execution till the username is entered and the
dialog box destroyed before continuing.

that didn't work
how can i do this? i have the option of creating the dialog box and when
the username is entered then in the function that handles the username,
create the rest of the GUI. i was wondering if there is any other way

thanks

cheers
 
J

John Fabiani

Ajay said:
hi!

i have an application which requires a username
what i am trying to do is when the application runs, a dialog window
appears which prompts the user for his name. once thats entered, the
dialog box is destroyed, the username stored and the application gui is
drawn

i tried doing this by adding a wait_window call in my application GUI's
init.
the idea was to suspend execution till the username is entered and the
dialog box destroyed before continuing.

that didn't work
how can i do this? i have the option of creating the dialog box and when
the username is entered then in the function that handles the username,
create the rest of the GUI. i was wondering if there is any other way

thanks

cheers
You did not state which GUI lib you are using. But in general you use a
modal dialog for that type of input. Before you delete the dialog read the
fields in the dialog.

John
 
J

Jorge Godoy

Ajay said:
hi!

i have an application which requires a username
what i am trying to do is when the application runs, a dialog window
appears which prompts the user for his name. once thats entered, the
dialog box is destroyed, the username stored and the application gui is
drawn

i tried doing this by adding a wait_window call in my application GUI's
init.
the idea was to suspend execution till the username is entered and the
dialog box destroyed before continuing.

that didn't work
how can i do this? i have the option of creating the dialog box and when
the username is entered then in the function that handles the username,
create the rest of the GUI. i was wondering if there is any other way

Which of the several toolkits are you using? In wxPython you can use
one of the provided dialogs or create a new modal dialog...
 
A

Ajay

hi!

i am using Tkinter

cheers


Quoting Jorge Godoy said:
Which of the several toolkits are you using? In wxPython you can use
one of the provided dialogs or create a new modal dialog...
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top