Hello Eric,

Monday, November 22, 1999, you wrote:

ECH> Let me see if I understand correctly.  Are you saying that you are trying to
ECH> fire off another button click event from within a button click event, and
ECH> are having trouble doing so?
Yes, You underatand correctly, but...
ECH>   What you might want to do is call a second
ECH> Dialogbox.
this is also do not work.
in Your sample you only make some Disable() and Enable() and then
exiting. but i do calc's inside event

your sample:
ECH> sub Goto_Click {
ECH>   $W->Disable();
ECH>   $W2->Show();
ECH>   $W2->Enable();
ECH>   $GotoBox->SetFocus();
ECH>   $GotoBox->Select(0,length($GotoBox->Text()));
ECH> }
and my sample:

sub DisableControls {
     $W2->Show(); $W2->Enable();
     $W->Disable(); $W->Hide(); 
     $W2->SetFocus(); $W2->Update();
     $cancel=0;
}
sub ProcessCurrent_Click {
    # to get currently selected item from listview.
    $selected = $LV->SendMessage(0x1042, 0, 0);
    ($selected == -1) && return 1;
    DisableControls();
    $PBa->SetRange(2);
    $PBa->SetPos(1);
    Process_Coordinates($selected);
    $PBa->SetPos(2);
    EnableControls();
    return 1;
}

#this is sample of calcs :)
sub Process_Coordinates {
  my($crd)=@_;
  print "Process item $crd ! ";
  $PBc->SetRange(5000);
  @coords=split(/[ \t]+/,$coordarray[$crd]);
  $TF->Text($TF->Text()."Process $coords[$#coords]\r\n");
  $W2->Update();
  for $i (1..5000) {
    $PBc->SetPos($i);
    print " \x08";     ### Very heavy calcs :)
    last if $cancel;
  }
}



Best regards,
 Max                            mailto:[EMAIL PROTECTED]



Reply via email to