I am using easygui multenterbox
so as to give users the option to edit specific information out of data being copied. My only problem is that pressing 'backspace' results in '\b' being added to the string instead of erasing a character.
Has anybody figured out a way to add a <backspace>
event to the field within the multenterbox?
I have used this event in the past on tkinter "Entry" and "Text".
sample code:
msg = "Enter name"
title = "New name"
fieldName = ['name']
newTitle= 'NewName'
fieldValue = [newName]
fieldValue = multenterbox(msg,title, fieldName,fieldValue)
# make sure that none of the fields were left blank
while 1: # do forever, until we find acceptable values and break out
if fieldValue == None:
break
errmsg = ""
# look for errors in the returned values
for i in range(len(fieldName)):
if fieldValue[i].strip() == "":
errmsg = errmsg + '"{}" is a required field.\n\n'.format(fieldName[i])
if errmsg == "":
# no problems found
print ("Reply was:", fieldValue)
break
else:
# show the box again, with the errmsg as the message
fieldValue = multenterbox(errmsg, title, fieldName, fieldValue)
The above code snippet is showing the functionality that I already have, and works. My program will open a multenterbox window with the value of NewTitle which could be edited by the user. How do I control the editable entry in the multenterbox so that it supports backspace?
Thanks, MMH