Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread TAnimationCompleteEvent usage example
Wed, Oct 21 2015 10:00 AMPermanent Link

Trinione

Can anyone provide a quick HOWTO for using TAnimationCompleteEvent type please?

http://www.elevatesoft.com/manual?action=viewtype&id=ewb2&type=TAnimationCompleteEvent
Wed, Oct 21 2015 12:14 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Trinione,

<< Can anyone provide a quick HOWTO for using TAnimationCompleteEvent type please? >>

How about I start with what you're trying to do ?  Once I know that, then I can first tell you whether you need to use the animation's oncomplete event to do it. Smile

Normally, this event is used for chaining together actions related to animations.  For example, say that you want to slide a panel off-screen when it is closed, and then make it invisible so that it can't be tabbed to, etc.  You can't just immediately set the panel's Visible property to False right after assigning the new Left value for the panel because that will cut off the animation mid-stream.  So, instead, you wait for the Left animation to complete, and use the OnAnimationComplete event to *then* modify the visibility.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Oct 21 2015 2:40 PMPermanent Link

Trinione

<< How about I start with what you're trying to do ?  Once I know that, then I can first tell you whether you need to use the animation's oncomplete event to do it. Smile

Normally, this event is used for chaining together actions related to animations.  For example, say that you want to slide a panel off-screen when it is closed, and then make it invisible so that it can't be tabbed to, etc.  You can't just immediately set the panel's Visible property to False right after assigning the new Left value for the panel because that will cut off the animation mid-stream.  So, instead, you wait for the Left animation to complete, and use the OnAnimationComplete event to *then* modify the visibility. >>

Tim:
You example is a use/case for me as I wanted to do just that also.

HOWEVER, what I am need to do is issue a Database.LoadRows(xx) call after the animation of a panel that contains a data grid. What happens is the animation pauses on loading the data and that makes the sliding panel appear jerky. Hence, I would like to use the event to then issue the Database.LoadRows command.
Wed, Oct 21 2015 2:48 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< HOWEVER, what I am need to do is issue a Database.LoadRows(xx) call after the animation of a panel that contains a data grid. What happens is the animation pauses on loading the data and that makes the sliding panel appear jerky. Hence, I would like to use the event to then issue the Database.LoadRows command. >>

Use something like this:

procedure TForm1.MyPanelAnimationComplete(Sender: TObject; Animation: TAnimation);
begin
  if (Animation=MyPanel.Animations.Left) then
     Database.LoadRows(xx);
end;

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Oct 22 2015 3:47 PMPermanent Link

Trinione

<< Use something like this:
procedure TForm1.MyPanelAnimationComplete(Sender: TObject; Animation: TAnimation);
begin
  if (Animation=MyPanel.Animations.Left) then
     Database.LoadRows(xx);
end;
>>

Thanks. Shall try this in a bit.
Image