Recent

Author Topic: OnClick not Fired on Run-Time Component  (Read 969 times)

Weitentaaal

  • Hero Member
  • *****
  • Posts: 554
OnClick not Fired on Run-Time Component
« on: March 19, 2021, 08:19:16 am »
Hello Guys :)

So i came to This Problem:

I Have i Button and when i click it a Panel will show up with some Informations u can choose between (See Attachement).

The Mouse Move Event does work but i dont get it why ?

How do i get "zeile1 OnClick" to work ??


egsuh

  • Hero Member
  • *****
  • Posts: 1776
Re: OnClick not Fired on Run-Time Component
« Reply #1 on: March 19, 2021, 09:18:57 am »
As I do not have your whole application, so I'm not sure whether this is the case or not. But one thing I can assume is that if you defined onclick events in a frame (not form), and then if the control is overidden in the form that uses the frame than there is possibility that onclick event is not called.

You have to look into .lfm file of the form, search for "inherited", and if you see the TLabel? TButton? whatever see that is in the Frame, then erase those part. But this method could be dangerous. So, delete the frame from the form, and re-put the frame on the form and try again. If my explanation was the reason for your app not working then it should work now.


howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: OnClick not Fired on Run-Time Component
« Reply #2 on: March 19, 2021, 09:45:16 am »
Try the attached project.

Weitentaaal

  • Hero Member
  • *****
  • Posts: 554
Re: OnClick not Fired on Run-Time Component
« Reply #3 on: March 19, 2021, 11:06:03 am »
As I do not have your whole application, so I'm not sure whether this is the case or not. But one thing I can assume is that if you defined onclick events in a frame (not form), and then if the control is overidden in the form that uses the frame than there is possibility that onclick event is not called.

You have to look into .lfm file of the form, search for "inherited", and if you see the TLabel? TButton? whatever see that is in the Frame, then erase those part. But this method could be dangerous. So, delete the frame from the form, and re-put the frame on the form and try again. If my explanation was the reason for your app not working then it should work now.



I Will Try this but Finished work for Today Thanks :)


Try the attached project.

I Knew that it worked with a Second Form but For Practice with TPanel i wnated to do it with that

 

TinyPortal © 2005-2018