Hi!
Since I couldn't find a replace option in listbox (Tcl/tk 8.4) I started writing my own using:
#find position in list
set position [lsearch $list "Line"]
# replace element from list
$list delete $position
$list insert $position "LINEID"
My list contains
Line
Trace
X
Y
Z
But was this does is to insert LINEID before Line like
LINEID
Line
Trace
...
The other problem is that I have configured each item of the list with a bkg and fg color and I want to keep those. All I want to do is to replace the text of one element with another one.
Any ideas?
Many thanks!
Since I couldn't find a replace option in listbox (Tcl/tk 8.4) I started writing my own using:
#find position in list
set position [lsearch $list "Line"]
# replace element from list
$list delete $position
$list insert $position "LINEID"
My list contains
Line
Trace
X
Y
Z
But was this does is to insert LINEID before Line like
LINEID
Line
Trace
...
The other problem is that I have configured each item of the list with a bkg and fg color and I want to keep those. All I want to do is to replace the text of one element with another one.
Any ideas?
Many thanks!