How to bind mouse button
Hello
I'm newbie here and I'm still learning tcl/tk and I have problem with bind function in hypermesh.
I would like to run a function when the user clicks the left mouse button. For example I want to read position of pointer.
I'm using bind function:
bind . <Button-1> {myProc}
The problem is that it doesn't work when I click mouse button in graphic area. It works fine when I click toolbars or tab areas, but I want to run my function if I click anywhere in HM window.
Instead of Button-1 I can use space button in my bind function:
bind . <Key-space> {myProc}
It works well but it's pointless and you have to use keyboard.
Any idea or suggestions how to deal with this?
Thanks a lot for help
Regards