The idea was to have a panel appear within an app that ‘grows’ out of a button and then disappears again the other way round.
INFO is defined as a panel in the following code section.
The code also shifts the panel a little during animation, which intensifies the ‘growing effect’ a little.
The problem is that the animation unfortunately only works in one direction (grow). Shrinking the panel does not work, the panel is simply faded out.
There are a few older posts describing the problem in a similar way. Apparently this is due to the way animations are executed by the code or got rendered.
Does anyone have a simple workaround for the problem? I would hate to do without the animation, but it should work in both directions.
Actually, I don't want to integrate a new library or write 50 lines of new code for the effect...
INFO is defined as a panel in the following code section.
The code also shifts the panel a little during animation, which intensifies the ‘growing effect’ a little.
The problem is that the animation unfortunately only works in one direction (grow). Shrinking the panel does not work, the panel is simply faded out.
There are a few older posts describing the problem in a similar way. Apparently this is due to the way animations are executed by the code or got rendered.
Does anyone have a simple workaround for the problem? I would hate to do without the animation, but it should work in both directions.
Actually, I don't want to integrate a new library or write 50 lines of new code for the effect...
Panel increase / decrease:
If Info.Visible = True Then
'this part does not work
Info.SetLayoutAnimated(0, 110dip, 300dip, 233dip, 290dip)
Info.SetLayoutAnimated(1000, 80dip, 400dip, 3dip, 3dip)
Info.Visible = False
Else
'this part works fine
Info.SetLayoutAnimated(0, 80dip, 400dip, 3dip, 3dip)
Info.Visible = True
Info.SetLayoutAnimated(1000, 110dip, 300dip, 233dip, 290dip)
End If