![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 10 of 20 total |
![]() |
Fri, Apr 15 2016 6:02 PM | Permanent Link |
Trinione | Hi:
How can the effect of adjusting the Width of a panel be animated? I have a form with two panels and a TSizer in the middle. At design-time BasicPanelRight := 300. The following code has no effect when the TSizer is on the form. with BasicPanelRight do begin BeginUpdate; try Animations.Width.Style:=asQuadEaseOut; Animations.Width.Duration:=500; Width:=500; finally EndUpdate; end; end; |
Sat, Apr 16 2016 3:52 AM | Permanent Link |
squiffy Telemix Ltd. | What is the actual effect you are looking for? It "works" for me, but it depends what you are trying to achieve.
I did this : BasicLeftPanel - consumption : right position : left stretch : right BasicRightPanel - position : left Sizer - inside BasicPanelRight and positioned left control : BasicPanelLeft I put your code in a button click event and the width of BasicPanelRight increased with animation. But I'm guessing that's not the effect you are looking for? |
Sat, Apr 16 2016 10:32 AM | Permanent Link |
Trinione | Hi:
No. That didn't work. I have attached a focused demo on this issue. Attachments: Panel_Sizer.zip |
Sat, Apr 16 2016 10:59 AM | Permanent Link |
squiffy Telemix Ltd. | Try this. Quick & dirty and might need refining :
procedure TForm1.Button1Click(Sender: TObject); begin BasicPanelLeft.Animations.Width.Style:=asLinear; BasicPanelLeft.Animations.Width.Duration:=500; BasicPanelRight.Animations.Left.Style:=asLinear; BasicPanelRight.Animations.Left.Duration:=500; BasicPanelLeft.Width:=250; end; procedure TForm1.Button2Click(Sender: TObject); begin BasicPanelLeft.Animations.Width.Style:=asLinear; BasicPanelLeft.Animations.Width.Duration:=500; BasicPanelRight.Animations.Left.Style:=asLinear; BasicPanelRight.Animations.Left.Duration:=500; BasicPanelLeft.Width:=500; end; |
Sat, Apr 16 2016 11:08 AM | Permanent Link |
squiffy Telemix Ltd. | To make it smoother -
change the right panel Layout.Stretch to Bottom only and set its width high (something like 500) The container it's wrapped in will prevent the extra width being visible, and you won't get that odd effect on sizing right. Try it, you'll see what I mean ![]() |
Sat, Apr 16 2016 12:06 PM | Permanent Link |
Trinione | squiffy wrote:
Try it, you'll see what I mean ![]() Squiffy: Great! Thanks. Works perfectly except for the 'glitch' on animating right. I have attached an updated demo file. Hopefully Tim or another user can resolve that remaining issue. Thanks again. Attachments: Panel_Sizer.zip |
Sat, Apr 16 2016 12:17 PM | Permanent Link |
squiffy Telemix Ltd. | You missed out my last bit -
change the layout stretch value on the right panel from bottomright to just bottom, and increase the right panle width to 500. That glitch goes away. Bit of a hack but it works . |
Sat, Apr 16 2016 12:30 PM | Permanent Link |
Trinione | << You missed out my last bit - change the layout stretch value on the right panel from bottomright to just bottom, and increase the right panle width to 500. That glitch goes away. Bit of a hack but it works . >>
I saw it and tested by setting it to ClientWidth, but doing so makes the panel too wide and the content would not be visible. |
Sat, Apr 16 2016 12:33 PM | Permanent Link |
Trinione | Perhaps a better way to explain what I need to happen is to say Animate the Slider itself.
Animating the panel gives that impression, yes. But, before clicking any of the buttons in the second demo I attached , moving the Sizer keeps everything in place properly. This is the effect I want. I wonder if the Sizer itself can be slid progmatically? |
Sat, Apr 16 2016 12:42 PM | Permanent Link |
squiffy Telemix Ltd. | I tried a few options for the slider, but none seemed to work.
Think Tim may have to pick this one up ![]() |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |