GetObjectInfo visibility - Forum

Forum Navigation
You need to log in to create posts and topics.

GetObjectInfo visibility

Hello

I have a paragraph which is initially not visible. Inside a pushbutton there is this code, but I cannot see my object because [Visible] == "visible"

GetObjectInfo "aide" "visibility" [Visible]
If [Visible] == "visible"
HideObject "aide" "fadeOut" 40
Else
ShowObject "aide" "fadeIn" 40
Endif

 

Hi @phil78, this would be the correct code:

GetObjectInfo "aide" "display" [Visible]
If [Visible] == "block"
  HideObject "aide" "fadeOut" 40
Else
  ShowObject "aide" "fadeIn" 40
Endif

When an object is hidden the "display" property is "none", It's different from the "visibility" property.
Please take a look here for more information:

https://stackoverflow.com/questions/133051/what-is-the-difference-between-visibilityhidden-and-displaynone

Regards.

javadrajabihakami has reacted to this post.
javadrajabihakami

thanks a lot @luishp

luishp has reacted to this post.
luishp