From: Batox on 1 Aug 2010 05:17 Some cells of my tablelist contain filenames. When the user clicks on them, I want to display a file selector box and let him choose a file. The following code nearly does the job, it accepts the chosen file only if the user changes something before editing ends. Can I somehow manually set the "dirty" flag for the temporary input widget? package require tablelist proc StartEdit {jl r c v} { return [tk_getOpenFile] } tablelist::tablelist .tl -columns {0 Filename} -editstartcommand StartEdit ..tl columnconfigure 0 -editable true ..tl insert end - ..tl insert end - pack .tl
From: Csaba Nemethi on 1 Aug 2010 14:30 Am 01.08.2010 11:17, schrieb Batox: > Some cells of my tablelist contain filenames. When the user clicks on > them, I want to display a file selector box and let him choose a file. > The following code nearly does the job, it accepts the chosen file > only if the user changes something before editing ends. Can I somehow > manually set the "dirty" flag for the temporary input widget? > > package require tablelist > > proc StartEdit {jl r c v} { > return [tk_getOpenFile] > } > > > tablelist::tablelist .tl -columns {0 Filename} -editstartcommand > StartEdit > .tl columnconfigure 0 -editable true > .tl insert end - > .tl insert end - > > pack .tl Set the -forceeditendcommand to 1/yes/true/on. I must admit that this feature is not clearly described in the documentation. I will extend the description of the -forceeditendcommand option for the next release. -- Csaba Nemethi http://www.nemethi.de mailto:csaba.nemethi(a)t-online.de
|
Pages: 1 Prev: Announce: Tcl3D version 0.4.3 released Next: tkdnd and unicode file names |