Python GUI Tutorial - 36 - input through popup window

preview_player
Показать описание
in this video, you'll learn about how we can take input from pop window input box.
the methods we're going to use are-

code in the video -

from tkinter import *
from tkinter import simpledialog
def get_me():
print(s)

root = Tk()

button = Button(root, text="popup", command=get_me)

-------------------------------------------

so i am sure your queries like -
- how we can take input through pop up window in tkinter?
- take integer from pop up windows?
- how to take input from messagebox in tkinter?
- take integer from messagebox in tkinter?
- take string from messagebox in tkinter?
- how to take float value from messagebox in tkinter?
- how to take input from the popup box?

have been solved.

if you've any problem related to this video, then please let us know in comment box. we'll reply as soon as possible.

Thanks.

you can contact us on-

Рекомендации по теме
Комментарии
Автор

I'm not sure what you where saying for a lot of the video.. but i still learnt how to do the popup.
Good tutorial and to the point :D

pauldudley
Автор

your actually amazing thank you soo much

DaniyalNasir
Автор

can't we just have one dialog box without needing the root box?

TiffanyNg
Автор

Once a user inputs a value, how to make sure that value is saved in a dialog box so that user doesnt needs to input the same vlaue in dialog box again and again

ankitarayon
Автор

Hello

First of all thank you for your video, it was of great help! My question now is and I have been unable to find this yet, how could I create multiple input dialogue boxes? What I mean by this is: let's say I'd like to build a "rock, paper & scissors where you play vs the computer using multiple dialogue boxes to enter your choice and it would return a random choice made from the computer. I got most of the parts except the fact that I don't know how to create a loop using this popup windows. Thank you very much in advance!

mihainicholas
Автор

This is interesting, there is an APPLAUD button I've never seen before below the video and a lack of closed captions

errorhostnotfound
Автор

Can you make the input land on an exact location in a triple quoted text? Yes that would start to look like Microsoft Office right there but Hmm.. I want it ;).

Heddanofarsan
Автор

i want the user to write for example help during inserting input in my program and when he write this word a window appear to tell him the instructions and to exit he should write also a certain word, how can i do that?

jhcutiepie
Автор

Amazing, but why you always forget to pack buttons??

rajiblochanbehera
Автор

how do i define s and make it a variable?

Peter-lvsl
Автор

AWESOME tutorial!! But one note. In your code you post below the video, you put the wrong variable: s = simpledialog.askfloat("input string", "please enter your name")

It's supposed to be askstring. Float is a number. You can't enter a name into a float variable.

jsx