I am having this focus problem on text widget, and wondering if anyone
can help. It is different with the one mentioned by someone before
I force tcl shell to load tk dll, and read in a script to create menu,
text, etc when it started. I can not type in anything in the widget,
unless I do one of the following
1. Click on the command console, and click back on the text widget.
Or
2. Load something into the text widget.
I suppose that is because my initial text is actually empty ? Or
something else ?
Any help will be greatly appreciated.
Regards
S-Y. Chen
Do you have a small script that reproduces this problem?
Regards,
Arjen
However I was able to pin-point the problem. It seems to be the
"tk_chooseDirectory" command causing the problem.
Here is what I have obverved
1. If I do not invoke this command in my initialization script, I can
type into text widget directly.
2. If I invoke this command twice in my initialization script, I can
type into text widget directly too.
3. Typing "tk_chooseDirectory" did not cause the problem. Because as I
have said, once I have focus on the command console (even without
doing anything), I can type in my text widget again.
I don't know if this helps. I am still trying to find out a solution.
Regards
S-Y. Chen
Since you are loading Tk into a tclsh shell, this looks similar to issue
discussed here:
http://groups.google.fr/group/comp.lang.tcl/browse_thread/thread/80010819b7e94a29/86b800ebe9622b7c
and its related ticket:
https://sourceforge.net/tracker/?func=detail&aid=2001072&group_id=12997&atid=112997
Eric
tkwait visibility .
before the
tk_chooseDirectory
Thanks a lot !
Regards
S-Y. Chen