![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Fri, Aug 12 2016 7:59 PM | Permanent Link |
Trinione | How can a components Event Method be set to nothing?
Basically, the opposite of assigning a method at run-time via the OnClick = OnClickHandler. OnClick := nil // does not work. |
Sat, Aug 13 2016 4:15 AM | Permanent Link |
Emin | Trinione,
They all work as expected. At what stage you are trying to set OnClick. May be you are doing it before the component loading stage so that your assignments are overridden. Emin Borbor procedure TForm1.NewHandlerForClick(Sender: TObject); begin ShowMessage('NewHandlerForClick', ''); end; procedure TForm1.Button1Click(Sender: TObject); begin ShowMessage('Button1Click', ''); end; procedure TForm1.Button2Click(Sender: TObject); begin Button1.OnClick := nil; end; procedure TForm1.Button3Click(Sender: TObject); begin Button1.OnClick := NewHandlerForClick; end; |
Sat, Aug 13 2016 6:20 AM | Permanent Link |
Trinione | << They all work as expected. >>
Emin: Yes, it works. My error was I forgot to chamne the parameter of the function from a TControl to a TForm. As the event method (OnAnimationComplete) does not exist for a TControl the error occured. Thanks you, Trinione, |
This web page was last updated on Thursday, March 30, 2023 at 10:19 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |