For Programmers: Free Programming Magazines  


Home > Archive > PerlTk > June 2006 > toplevel or frame: bind inherited to widgets?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author toplevel or frame: bind inherited to widgets?
filippo

2006-06-24, 8:11 am

Hello,

I have a frame containing some widgets and I want to catch some
keybinds from all widget (es esc key destroy the frame regardless which
widget has got the focus). Is it possible to create a keybind for frame
(or a toplevel) that catch the keypress for all widget inside the frame
(or toplevel)?

Thanks,

Filippo

Ch Lamprecht

2006-06-24, 8:11 am

filippo wrote:
> Hello,
>
> I have a frame containing some widgets and I want to catch some
> keybinds from all widget (es esc key destroy the frame regardless which
> widget has got the focus). Is it possible to create a keybind for frame
> (or a toplevel) that catch the keypress for all widget inside the frame
> (or toplevel)?


Most probably not what you expected:

$_->bind('<event-sequence>',\&my_sub) for ($frame->children());


Christoph
--

perl -e "print scalar reverse q/ed.enilno@ergn.l.hc/"
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com