>Da: jvrom...@squirrel.nl

  Hi,

>I have an application that displays a panel, and the panel contains a
>widget (bitmap). It's a touchscreen application, so the whole
>panel is sensitive to being clicked (touched).
>
>Apparently command events are not propagated from a widget to its
>parent, so I force propagation explicitly. This is an excerpt from the
>code:
>
>  my $widget = Wx::StaticBitmap->new($panel, -1, ... );
>  
>  Wx::Event::EVT_LEFT_UP( $widget, sub {
>       $_[1]->ResumePropagation(1);
>       $_[1]->Skip;
>  } );
>
>  Wx::Event::EVT_LEFT_UP( $panel, \&action );
>
>This works w/o problems.
>
>Now I've added EVT_LEFT_DOWN in the same manner:
>
>  Wx::Event::EVT_LEFT_DOWN( $widget, sub {
>       $_[1]->ResumePropagation(1);
>       $_[1]->Skip;
>  } );
>
>  Wx::Event::EVT_LEFT_DOWN( $panel, \&someotheraction );
>
>This works on Linux, but I don't seem to get EVT_DOWN on Windows.
>
>Before investigating this further, does this look familiar to anybody?

  Wx::StaticBitmap and Wx::StaticText are not meant to be "active";
actually, I'm surprised that on Windows you get the mouse up events;
if you need a clickable image, it's better to use a Wx::Window directly.

HTH,
Mattia

Reply via email to