- This topic has 8 replies, 2 voices, and was last updated 6 years, 3 months ago by HeDiBo.
-
AuthorPosts
-
June 25, 2018 at 6:20 pm #37877HeDiBoParticipant
In the accompanying project, messages are shown when a TsRollOutPanel collapses and when the form is created.
As can been seen, the collapse occurs even before the form is created.
After the form is created the event occurs another THREE times!!
[attachment=8801:acPopups.zip]
This is not how it should work.
Even one event after the form is created is already too much: the panel is not expanded, so there's nothing to collapse.
June 26, 2018 at 6:52 am #58085SupportKeymasterThank you for the example.
This issue will be solved in the nearest release, event will be called once only.
June 26, 2018 at 9:22 am #58089HeDiBoParticipant'Support' wrote:Thank you for the example.
This issue will be solved in the nearest release, event will be called once only.
I hope that will be after the OnCreate of the containing form
June 26, 2018 at 9:36 am #58090SupportKeymasterWhat to do if Collapsed state is not changed after OnCreate event?
It's possible if property value is loaded from Dfm before OnCreate.
June 26, 2018 at 9:57 am #58091HeDiBoParticipant'Support' wrote:What to do if Collapsed state is not changed after OnCreate event?
It's possible if property value is loaded from Dfm before OnCreate.
I'm not sure what the problem is.
If the Collapsed state is not changed, then naturally there should be no OnAfterCollapse event. (OnAfterExpand may be another matter, because one may allocate resources needed for the expanded panel, like I show in the sample project, but again, that in fact rules out the OnAfterCollapse event, which otherwise might free resources that were never allocated).
If you think there should be an event to indicate the state (Collapsed or not) you might consider implementing an additional OnChanged event.
July 8, 2018 at 11:04 am #58098SupportKeymasterHello!
I meant that Collapsed state may be defined before OnCreate event (when properties are loaded from Dfm).
If panel was expanded before OnCreate event, then OnAfterExpand will not be called…
July 8, 2018 at 11:16 am #58101HeDiBoParticipant'Support' wrote:Hello!
I meant that Collapsed state may be defined before OnCreate event (when properties are loaded from Dfm).
If panel was expanded before OnCreate event, then OnAfterExpand will not be called…
I consider OnAfterCollapse and OnAfterExpand to be events that are the result of some user action. If the roll out panel is expanded in the dfm, than it's very easy for a programmer to implement in the FormCreate event allocation of the resources needed for the panel (test if Collapsed state is False).
July 17, 2018 at 12:01 pm #58174HeDiBoParticipantThe number of event calls has been reduced to one in AC 13.17
However, the OnAfterCollapse event still occurs if the Collapsed property is True. As I said, that precludes freeing up resources that were allocated in the OnAfterExpand event. If Collapsed would be the default property, the OnAfterCollapse event could be suppressed when reading the dfm, isn't it?
July 28, 2018 at 10:10 pm #58251HeDiBoParticipantNo change in 13.18
-
AuthorPosts
- You must be logged in to reply to this topic.