![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Mon, Jul 2 2018 5:06 AM | Permanent Link |
thomh | Based on this old thread started by Trinione
https://www.elevatesoft.com/forums?action=view&category=ewb&id=ewb_general&msg=8614&start=1&keywords=animation&searchbody=True&forum=EWB_Announce&forum=EWB_General&forum=EWB_Components&forum=EWB_Server&forum=EWB_Demos&forum=EWB_Binaries&forum=EWB_Discussion&forum=EWB2_Preview&forum=EWB_Beta#8614 I have code to slide in from the left, right and slide down from top. But I cannot manage to get slide up from bottom to work. This works for slide in from top: procedure SlideInTop(AControl: TControl; AStyle: TAnimationStyle; ADuration: Integer); var TempPosition: TLayoutPosition; begin with AControl do begin BeginUpdate; try Visible := False; TempPosition := Layout.Position; // Save the current layout position DefineLayout; // Peg the defined dimensions of the control based upon the current layout Layout.Position := lpNone; Animations.Top.Style := asNone; Animations.Visible.Style := asNone; Animations.Left.Style := asNone; Top := -Parent.ClientHeight; finally EndUpdate; // Render end; BeginUpdate; try Visible := True; Animations.Top.Style := AStyle; Animations.Top.Duration := ADuration; Layout.Position := TempPosition; // Set the layout to the saved layout finally EndUpdate; // Render (with animation) end; end; end; I tried setting Top := 0 but that did not work. Can somebody point me in the right direction? Thanks. // Thom |
Mon, Jul 2 2018 5:45 AM | Permanent Link |
Matthew Jones | thomh wrote:
> Can somebody point me in the right direction? Ho ho. But have you tried setting Top to +Parent.ClientHeight (instead of negative)? The key being that you want it to end up at zero, and the negative one starts it above, so you need to start it below. -- Matthew Jones |
Tue, Jul 3 2018 1:18 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Thom,
Just FYI, there's a TControl method that does the sliding work for you: https://www.elevatesoft.com/manual?action=viewmethod&id=ewb2&comp=TControl&method=SlideTo Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, December 1, 2023 at 06:01 PM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |