Sign in to follow this  
SteveMyres

Controlling visibility on static items

Recommended Posts

With animated screen elements, typically there is a way to control visibility, usually on the Size tab. There's a window for you to enter an expression the result of which determines whether or not the component will be displayed. I thought I read somewhere there is a visibility control for every component, but I'll be darned if I can find one for Static Text or Panels. I guess in the case of the Static Text, I could use Descriptive Text instead with only a single entry, and make symbols that are just a flat piece in lieu of the panels, because those do have visibility controls, but it seems a little kludgey.

Share this post


Link to post
Share on other sites

Every component has a visible variable. Name the component (right click and select Component Name...), then do:

component.mycomponent.visible = 0

to make invisible or =1 to make visible

This can be done in a sequence, in an event, anywhere really that takes script.

Share this post


Link to post
Share on other sites

Is there an abbreviated self-referential syntax for use inside element events, such as:

Component.ME.visible = 1

or

ME.visible = 1

or just

Visible = 1?

Share this post


Link to post
Share on other sites

If it is inside the component itself (i.e. in a quick sequence for a component), then its local to the script, so just visible = 1. Same with all other component parameters.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this