Skip to content
Related Articles

Related Articles

Improve Article
EasyGUI – Multiple Enter Box
  • Last Updated : 22 Sep, 2020

Multiple Enter Box : It is used to get the multiple input from the user at the single time, inputs can be any keyboard input, it takes inputs in form of string. It displays the title, message to be displayed, a group of places to enter a text and a pair of “Ok”, “Cancel” button which is used confirm the input. It is similar to normal enter box but in multiple enter box multiple inputs can be given at same time, below is how the enter box looks like

In order to do this we will use multenterbox method

Syntax : multenterbox(message, title, list_items, lust_default_text)

Argument : It takes 4 arguments, first string i.e message/information to be displayed, second string i.e title of the window, third is list of string i.e item name and forth is list of string which is default text

Return : It returns the list of entered text and None if cancel is pressed



Example :
In this we will create a multi enter box with default text, and will show the specific message on the screen according to the entered text, below is the implementation




# importing easygui module
from easygui import *
  
# message to be displayed
text = "Enter the following details"
  
# window title
title = "Window Title GfG"
  
# list of multiple inputs
input_list = ["Name", "Class", "Section", "Address"]
  
# list of default text
default_list = ["eg GfG", "XII", "A", "GeeksforGeeks"]
  
# creating a integer box
output = multenterbox(text, title, input_list, default_list)
  
# title for the message box
title = "Message Box"
  
# creating a message
message = "Enterted details are in form of list : " + str(output)
  
# creating a message box
msg = msgbox(message, title)

Output :


Another Example :
In this we will create a multi enter box without default text, and will show the specific message on the screen according to the entered text, below is the implementation




# importing easygui module
from easygui import *
  
# message to be displayed
text = "Enter the following details"
  
# window title
title = "Window Title GfG"
  
# list of multiple inputs
input_list = ["Geek Name", "Geek ID", "Experiance"]
  
  
# creating a integer box
output = multenterbox(text, title, input_list)
  
# title for the message box
title = "Message Box"
  
# creating a message
message = "Enterted details are in form of list : " + str(output)
  
# creating a message box
msg = msgbox(message, title)

Output :


 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course




My Personal Notes arrow_drop_up
Recommended Articles
Page :