I have a lable with a picture on it.
$W->AddLabel(
-name => "evalStatus",
-left => 102,
-top => $W->ScaleHeight-16,
-width => 16,
-bitmap => 1,
);
and a sub that toggles a little red circle on and off. This works fine if I
trigger it from a button or attach it to a timer but if I do
&EvalActivated;
eval ($code);
&EvalActivated;
the button never turns on.
sub EvalActivated {
$W->evalStatus->SetImage($StatOffbmp) if $active;
$W->evalStatus->SetImage($StatOnbmp) if not $active;
$active=!$active;
$W->InvalidateRect(0);
GUI::Update($guiW);
$W->{'evalStatus'}->Show();
$W->Show();
}
trial solutions shown, no joy yet.
This is probably something obvious, right? :-)
Rob
http://bangkokwizard.com/
If you were supposed to understand it, we wouldn't call it code