The bindings are not magical, do a bindtags on the widget to see the**************************
binding tags, then look on each of them to see what they have for enter, >leave, and the clicks.
On Sun, 24 Dec 2023 14:59:09 -0600, Gerald Lester wrote:
The bindings are not magical, do a bindtags on the widget to see the >>binding tags, then look on each of them to see what they have for enter, >>leave, and the clicks.**************************
I find this difficult.
Maybe text widgets require some additional step?
I find this difficult.
It is not so difficult, but one does have to "poke around":
On Mon, 25 Dec 2023 02:43:26 -0000 (UTC), Rich wrote:
I find this difficult.
It is not so difficult, but one does have to "poke around":
**************************
Many thanks for your help again. It was fascinating to see how you
inspect the innards of the machine. I'm just sorry I couldn't figure it
out by myself. I feel stupid. But I'm always grateful for the education.
As I like to say, Tcl is easy but I don't always understand Tk. It all
looks like a big entanglement of strings to me. Each one can move many
other strings which in turn move their on.
Your guidance seems to have pointed me in the right direction. But I
still can only go so far.
I bound Ctrl-Left and Ctrl-Right to swtching tabs. It works except that Ctrl-Left makes the selections go up one line at every key press.
Only Ctrl-Left. So I put your teachings into practice:
bindtags $::Widgets_unipane.fileListPane.filenameframe.box
foreach b [bind Text] {puts $b}
and here it is, I'm sure these are the culprits:
<Control-Key-Next>
<Control-Key-Prior>
puts [bind Text <Control-Prior>]
%W xview scroll -1 page
puts [bind Text <Control-Next>]
%W xview scroll 1 page
I gotta say, I kind of resent these default bindings. They get in the
way often. I think we should have more "pure" or "agnostic" widgets.
Anyway, I'm stumped again. How do I kill those?
I googled and found people with more or less similar problems, but
never a satisfactory answer.
For example:
"Removing a binding from one bindtag does not mean that the event will
not be processed; a binding on another bindtag might still pick it up.
Trying to hack around the other bindtags to fool the code is not going
to be satisfactory. However, if a binding on one tag finishes with a
break, it prevents further bindtags from being tried; it terminates processing early."
That sounds terse.
1. Is it doable or not? I don't think that is answered clearly.
2. I am using break. But that is obviously not preventing the hard
coded [bind Text <Control-Prior>] from kicking in.
3. Even more confusing is the fact that [bind Text <Control-Prior>] is causing the "ghost" movement, but [bind Text <Control-Next>] is not.
Why is that?
Why do they behave differently?
I just hope you can have a clue out of what I'm telling you so far.
Can you?
On Mon, 25 Dec 2023 02:43:26 -0000 (UTC), Rich wrote:
I find this difficult.
It is not so difficult, but one does have to "poke around":
**************************
Many thanks for your help again. It was fascinating to see how you
inspect the innards of the machine. I'm just sorry I couldn't figure it
out by myself. I feel stupid. But I'm always grateful for the education.
As I like to say, Tcl is easy but I don't always understand Tk. It all
looks like a big entanglement of strings to me. Each one can move many
other strings which in turn move their on.
I think if you want to be serious with tcl/tk, you need to build some >development tools.**************************
On Wed, 27 Dec 2023 21:49:45 -0800, et99 wrote:
I think if you want to be serious with tcl/tk, you need to build some**************************
development tools.
I catch your drift. I had to write some kind of debugger thingy to help
me understand some bug that was hard to find and driving me crazy.
Well, it worked. I found and killed the bug.
I'm always trying to learn, I do read the wiki and there aren't enough
days in a lifetime to read every interesting piece of code that RS has shared, but I read it and I'm learning.
I'm not sure how "serious" I am with tcl/tk. I mean, it's a hobby. I
don't do it professionally. I don't think I could. That I write any code
at all and it even works (!) is quite an accomplishment to me already.
I have very few pleasures in this life ever and coding in Tcl is one of
them. I guess I'm good.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 485 |
Nodes: | 16 (2 / 14) |
Uptime: | 131:44:16 |
Calls: | 9,655 |
Calls today: | 3 |
Files: | 13,707 |
Messages: | 6,166,572 |