Hi again.<br><br>I am trying to get the text of the selection in a list box and put into a variable, which is put into a label. i.e., whatever is selected will show in the label.<br><br>However, because at the beginning there is nothing in the listbox (and therefore no selection), the tuple returned by 
<span style="font-family: courier new,monospace;">curselection() </span>is <span style="font-family: courier new,monospace;">()</span>, therefore when i try and <span style="font-family: courier new,monospace;">get()</span>
 from the linenumber in this tuple, the index is "out of range"<br><br>here is the section of the program:<br><br><font face="courier new,monospace">box = Listbox(root, bg = '#ebe9ed', relief = 'groove', height = 15)
<br>box.grid(row = 2, columnspan = 2, sticky = W+E, padx = 3)<br>box.bind("<Double-Button-1>", DeleteCurrent)<br><br>v = StringVar()<br>number = box.curselection()<br>v.set = (box.get(int(number[0])))<br>print number
<br>         <br>current = Label(root, textvariable = v)<br>current.grid(row = 3, columnspan = 2, sticky = W+E, padx = 3)</font><br clear="all"><br>and here is the error:<br><br><font face="courier new,monospace">Traceback (most recent call last):
<br>  File "C:\My Documents\My Python\Notes.py", line 27, in <module><br>    v.set = (box.get(int(number[0])))<br>IndexError: tuple index out of range</font><br><br>How can i get it to only take the variable when i have selected something, or any other solution!
<br><br>Thanks,<br><br>Sam<br>-- <br>I intend to live forever - so far, so good.<br><br>SaM