Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Entry widget problem

Status
Not open for further replies.

anirban2k2001

Programmer
Aug 25, 2003
27
0
0
IN
Hi all!

I have a frame .f3 and two entry widgets which accepts input from the user. The relevant code is:

############################################################

frame .f3 -width 250 -height 270
pack .f3
pack propagate .f3 0

label .f3.l6 -text "Panel No" -font $fnt9
place .f3.l6 -x 0 -y 110

entry .f3.value -textvariable m_pn -width 10 -font $fnt9
place .f3.value -x 65 -y 112
set prev ""

label .f3.l7 -text "Meter No." -font $fnt9
place .f3.l7 -x 8 -y 130

entry .f3.value -textvariable m_no -width 10 -font $fnt9
place .f3.value -x 1 -y 1
set prev ""

############################################################

When I execute the script, it gives me the following error:
Error : window name "value" already exists in parent

My requirement is that there will be more than one entry widget in frame f3 with different validations for each of them.

Kindly help.

Regards,
Anirban Sarkar
 
You're trying to instantiate 2 entry widgets with the same name (.f3.value):
entry .f3.value -textvariable m_pn -width 10 -font $fnt9
place .f3.value -x 65 -y 112
set prev ""

and
entry .f3.value -textvariable m_no -width 10 -font $fnt9
place .f3.value -x 1 -y 1
set prev ""


One of them needs to have a different name.

Bob Rashkin
rrashkin@csc.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top