Works like a charm, special thanks. Steve =====================================================
Footnote: He called his wife to see if he should pick up Fish and Chips on the way home. She hung up on him. She is still fuming over letting him name the kids. -----Original Message----- From: Python-list <python-list-bounces+gronicus=sga.ni...@python.org> On Behalf Of Cousin Stanley Sent: Friday, August 28, 2020 7:47 AM To: python-list@python.org Subject: Re: How do I place a preset into the text box? Steve wrote: > The following program compiles but does not quite do what I would like > it to do. Line 19 is the preset information but I do not seem to be > able to get it into the form by code. My purpose is to let the user > make changes without having to re-enter the entire code. > .... You might consider moving the entry get() function into the Submit() call back .... def Submit() : label.configure( text = 'The new code is : ' + NewCode.get() ) x = ( NewCode.get() ) print( "\n The new code entered is : " + x ) The following insert function will show the OldCode in the entry box .... OldCode = ( "1234-abcd" ) # .... CodeEntered = ttk.Entry( window , width = 15 , textvariable = NewCode ) CodeEntered.grid( column = 2 , row = 3 , pady = 10 ) CodeEntered.insert( 0 , OldCode ) -- Stanley C. Kitching Human Being Phoenix, Arizona -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list