FoxInCloud
Animation when controls are resized, hidden and shown
Gravatar is a globally recognized avatar based on your email address. Animation when controls are resized, hidden and shown
  Paul
  All
  Feb 12, 2019 @ 11:03pm

Hi,

I have noticed that controls that I set .visible = .T. or .F., or controls that are resized, go through some sort of animation in the page - expanding or contracting.

While this is cool for some things, it isn't appropriate for things that are hidden at runtime.
For example, in the Init of a form I hide some controls and in the browser I see those controls starting as visible and then vanishing after their animation.

How do I turn that off? Can I turn it off only for certain events (e.g. visible = .F.)?

Thanks
Paul

Gravatar is a globally recognized avatar based on your email address. re: Animation when controls are resized, hidden and shown
  FoxInCloud Support - Thierry N.
  Paul
  Feb 13, 2019 @ 12:01am

Sure, see properties .wuEffectHide and .wuEffectShow on all visual controls.

For controls you want to always hide in web mode, you should do:

procedure Init
…
this.Visible = wlLAN() && for a class: use a function because thisForm may not be in scope
this.Visible = thisForm.wlLAN && for an instance
wcPropSaveEdit(this, 'Visible', .T.) && remove 'Visible' to make sure this control never shows up
…
return dodefault()

this way the control will be generated with style="display:none;" and will not show up for the brief delay until the page is fully initialised.

Gravatar is a globally recognized avatar based on your email address. re: Animation when controls are resized, hidden and shown
  Paul
  FoxInCloud Support - Thierry N.
  Feb 14, 2019 @ 12:06pm

Nice. Anything to stop the animation when .left or .top has been changed in the form's Init and the control seems to "slide" into position in the browser?

Paul

Gravatar is a globally recognized avatar based on your email address. re: Animation when controls are resized, hidden and shown
  FoxInCloud Support - Thierry N.
  Paul
  Feb 14, 2019 @ 12:17pm

no, so far we have no option to neutralise this behaviour

© 1996-2024