TsRolloutPanel events for expand and collapse come too soon

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #58085
    Support
    Keymaster

      Thank you for the example.

      This issue will be solved in the nearest release, event will be called once only.

      #58089
      HeDiBo
      Participant
        '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

        #58090
        Support
        Keymaster

          What to do if Collapsed state is not changed after OnCreate event?

          It's possible if property value is loaded from Dfm before OnCreate.

          #58091
          HeDiBo
          Participant
            '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.

            #58098
            Support
            Keymaster

              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…

              #58101
              HeDiBo
              Participant
                '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).

                #58174
                HeDiBo
                Participant

                  The number of event calls has been reduced to one in AC 13.17 a3.gif

                  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?

                  #58251
                  HeDiBo
                  Participant

                    No change in 13.18

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • You must be logged in to reply to this topic.