Igor Sosa Mayor wrote:
> Hi again,
>
> sorry for asking again...
>
> I wnat to bind <comma> to showGameInfo. I put:
>
>       bind $w <comma> {
>               toggleGameInfo
>       }
>
> or
>
>       bind $w <comma> {
>               ::toggleGameInfo
>       }
>
> I also tried F12 (disabling the later bind to correspondence) without
> any success...
>
> Any hint?

bind $w <comma> {
         eval [excludeTextWidget %W]
         set ::showGameInfo [expr {! $::showGameInfo}]
         ::toggleGameInfo
         break
}


The "eval [...." line disable the shortcut for text widgets (without 
this line, writing a comment with a comma will rotate the board for example)
The "set ::showGameInfo ..." line toggle the status (visible or not) of 
the GameInfo window
The "::toggleGameInfo" line show (or hide) the GameInfo window 
(misleading function name indeed)
The "break" line signal that the user input has been processed and 
should not be sent to parent windows.

Bye,
Fulvio

------------------------------------------------------------------------------
_______________________________________________
Scid-users mailing list
Scid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scid-users

Reply via email to