Jump to content

ExtEvents fails on runtime created panel - Solved


Ron
 Share

Recommended Posts

I am not able to make extevents linked to a runtime created panel to work,
although unievents linked to runtime created objects seem to be working fine.

I have made a testcase with two panels, one design time created and one runtime created,
with the same mouseover event, triggering a console.log function just for testing.

The events are stored OK in the runtime created panel object, something you will
see if you check the value for mouseover, but the events are somehow not triggered.

 

 

runtime extevents.png

project1.zip

Edited by Ron
problem solved
Link to comment
Share on other sites

7 hours ago, Ron said:

The events are stored OK in the runtime created panel object, something you will
see if you check the value for mouseover, but the events are somehow not triggered.

Hello,

You must assign a name.

  panTest:= TUniPanel.Create(self);
  with panTest do
  begin
    parent:=mainForm;
    Name := 'dynamicPanel'; //<-----
    ...

 

Link to comment
Share on other sites

4 hours ago, Sherzod said:

Hello,

You must assign a name.

 

 

Then it works fine! Thank you very much, Sherzod :)

I assumed that the name was set to the variable name, as with the design time components,
and that it was not necessary to set it specifically.

Link to comment
Share on other sites

  • Ron changed the title to ExtEvents fails on runtime created panel - Solved

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...