From: Graciliano M. P. \(V. Sites\) <gm...@vi...> - 2002-05-22 23:28:17
|
> >Sample: > >... > > > > use Wx::Event qw(EVT_SIZE) ; > > > > EVT_SIZE( > > $obj , > > sub { &My_obj_config($obj, $pos , $size) } > > ) ; > > > >... > ? I don't understand. You say that it does not work for "more than one", > but here I see just one EVT_SIZE; also, where do $pos and $size in the > event handler come from? > The codes of the sample show only the idea, and the codes are inside a loop in my program. I found the error! If you have for example 2 textctrl inside a frame (the textctrl have the same parent), when you resize the frame the EVT_SIZE was past for the both textctrl in the same time and perl don't make the EVT_SIZE! To fix this I link the perl function in the Frame object, not in the textctrl, and do the &My_obj_config($obj, $pos , $size) for each object inside the frame (the 2 textctrl). Graciliano M. P. |