Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 20 of 20 total
Thread Animation TSizer effect
Sat, Apr 16 2016 12:50 PMPermanent Link

squiffy

Telemix Ltd.

Avatar

Try this one attached.
Any better?



Attachments: panel_sizer_help.zip
Sat, Apr 16 2016 2:35 PMPermanent Link

Trinione

<< Any better? >>

Yep! Thanks! I noted that subsequent manual resizing became very slow and added the following code:

--------------------------------------------------
procedure TForm1.BasicPanelLeftAnimationComplete(Sender: TObject; Animation: TAnimation);
begin
 if (Animation = BasicPanelLeft.Animations.Width) then
 begin
   BasicPanelLeft.Animations.Width.Style := asNone;
   BasicPanelLeft.Animations.Width.Duration := 0;
   BasicPanelRight.Animations.Left.Style:= asNone;
   BasicPanelRight.Animations.Left.Duration := 0;
   BasicPanelRight.Animations.Width.Style := asNone;
   BasicPanelRight.Animations.Width.Duration := 0;

   BasicPanel1.Animations.Width.Style :=asNone;
   BasicPanel1.Animations.Width.Duration := 0;

 end;
end;
--------------------------------------------------

I noted some issues such as resizing after the width was manually set to less that 250, but that can be an easy check to make or set a constraint accordingly.

Thank you for you assistance.
Sat, Apr 16 2016 2:55 PMPermanent Link

squiffy

Telemix Ltd.

Avatar

Good stuff.
Glad I was of some help.
Mon, Apr 18 2016 12:53 PMPermanent Link

Trinione

Squiffy / Tim / anyone else:
I have attached a demo which works save for 2 or 3 issues describe within the form itself.

I am certain Tim can quickly state the solution or if fixes are needed for it to work properly.

Thanks.



Attachments: panel_sizer_help.zip
Mon, Apr 18 2016 3:55 PMPermanent Link

squiffy

Telemix Ltd.

Avatar

Can't help much there, sorry.

For the grid chipping off on sizing right, you can turn off the 2nd column's StretchToFit for the duration of the animation, turning it back on in the OnAnimationsComplete event, but that only fixes the data, the column header still chops off. Not much use.
Mon, Apr 18 2016 6:07 PMPermanent Link

Trinione

<< Can't help much there, sorry.
For the grid chipping off on sizing right, you can turn off the 2nd column's StretchToFit for the duration of the animation, turning it back on in the OnAnimationsComplete event, but that only fixes the data, the column header still chops off. Not much use. >>

Thanks for the help thus far.

I am hoping Tim would be able to quickly point us in the right direction.
Tue, Apr 19 2016 10:49 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< I am hoping Tim would be able to quickly point us in the right direction. >>

Per email:

<< (1) 'Animate Right' results in Grid Columns being resized before animation. This gives an undesired grid cut off effect. >>

This due to the fact that you can't (at least currently) specify animations for grid columns.

<< (2) On the first and on some subsequent 'Animate Left', grid cells animate to the right also. >>

No, they're not animating, they're just moving directly to the right due to the StretchToFit property being set to True.  In other words, 2) is just the reverse of 1).

<< (3) A minor issue: On 'Animate Left', sizer background turns White as it glides to position >>

That's just an artifact of the animation and the drawing in the browser not keeping up with the movement.  The white that you're seeing is from the container page.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Apr 19 2016 1:01 PMPermanent Link

Trinione

Tim:
I recall you saying Animations are 'primitive' and in need of work at in the future. For now this is the best this can be done, so I'll await an update to TAnimations class for the proper effects.

Thanks.
Thu, Apr 21 2016 12:19 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

<< I recall you saying Animations are 'primitive' >>

No, I said that they were "animation primitives", which means that they are the building blocks on top of which any other types of effects would be built.  If you can't do it with the animations that are present right now, then you probably can't do it (or don't want to do it).  In the case of the grid, you probably *don't* want to try to animate the grid columns because the number of UI elements that need to be animated at the same time will cause the animation to lag and not be responsive.  It's just not a good idea in terms of performance, which is why the grid doesn't do it "out of the box".

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Apr 21 2016 10:17 PMPermanent Link

Trinione


<< I recall you saying Animations are 'primitive' >>

Tim Young [Elevate Software] wrote:
<< No, I said that they were "animation primitives" >>

LOL. Ok.
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image