Hi,
Simple question. I have a frame and a canvas and I want to store the contents of these in a variable. Can any please help me with that? Here is my code:
canvas .frame1.canvas1
pack .frame1.canvas1
.frame1.canvas1 create rectangle 50 50 250 250 -fill red
set c $.frame1.canvas1
line above this does not places the contents of the canvas in c, therefore when I print contents of c as a label, it displays $.frame1.canvas1----------------------------------
frame .frame2
pack .frame2 -padx 10 -pady 10
label .frame2.label1 -text $c
pack .frame2.label1
Simple question. I have a frame and a canvas and I want to store the contents of these in a variable. Can any please help me with that? Here is my code:
canvas .frame1.canvas1
pack .frame1.canvas1
.frame1.canvas1 create rectangle 50 50 250 250 -fill red
set c $.frame1.canvas1
line above this does not places the contents of the canvas in c, therefore when I print contents of c as a label, it displays $.frame1.canvas1----------------------------------
frame .frame2
pack .frame2 -padx 10 -pady 10
label .frame2.label1 -text $c
pack .frame2.label1