Home Forums General Programming setVisible vs setProperty(componentVisibility)?

This topic contains 3 replies, has 1 voice, and was last updated by  human fly 4 weeks, 1 day ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #73052

    human fly
    Participant

    setVisible or setProperty(componentVisibility,etc, etc)?

    there is also the property: ‘is component visible’ which is
    either ticked or unticked, as a panel property. can be thought
    of as its ‘default’ state.

    i’m using setVisible, at the moment, to show/hide some uiTabs.
    it works, and loads fine, but the downside is that when you
    go to Panel edit mode, you can see them all, with underlying
    ones greyed-out, and this makes it difficult to work.

    setProperty(componentVisibility,etc,etc) is more targeted.
    i’ve forgotten why i have not used that. there was a different
    downside to it when using overlaid modulators/components in the
    same screen position.

    these are very useful commands – with drawbacks. i’ve started
    using uiTabs with tabs hidden (depth=0), and operate them with
    separate click buttons instead, when i want to have pages.
    but i’m still using setVisible, for some things.
    just can’t remember why i’m not using componentVisibility -?-
    🙂
    i know goodweather was interested in this.

    #73080

    human fly
    Participant

    observations:
    if you use setVisible – on a uiTabs, for example: i have 2 uiTabs
    overlaid, using setVisible to show/hide them ( they are different
    sizes, it’s a solution i’m using)

    – the project with load fine. but as soon as you put it in Panel ‘edit’
    mode, the hidden panel and all its objects become ‘transparent’/greyed-out
    until you load the panel again.

    from memory, setProperty(“componentVisibility”, etc, etc) has a problem
    showing both at once.

    pretty sure setVisible is best, once the panel is made,
    but it’s hard to work with in Panel Edit mode if you get
    several things showing together.

    #73084

    human fly
    Participant

    ok i think i’ve figured this out:

    one of my tabs was showing greyed out as soon as i clicked
    panel edit – this is because i had an ‘old’ setting still
    made: there is also an ‘is component visible’ parameter in
    the properties pane, and i had this unticked. i have now
    re-enabled it – because i have lua controlling tabs/groups
    views completely now.

    > i added a new tabs, and this was showing ‘solid’/opaque
    all the time, whereas my existing tabs would go transparent,
    with all its modulators, as soon as i went into edit.

    fixed 🙂

    setVisible seems to work ok here now. starts up ok, as long
    as i have an ‘initViews’ method, called by my ‘panelLoaded’
    startup file.

    #73085

    human fly
    Participant

    correction: no that was wrong info… restarted the panel,
    and my latest new uiTabs was right up front.

    so i’ve had to set the property pane entry:
    ‘is component visible’ to disabled,
    and now it seems to start up properly again.

    still not quite right. mystery continues…

    edit: now trying this:
    i now have BOTH setVisible and setProperty(componentVisibility)
    setting that component visible in the startup method.

    working so far. (still suggests i’m doing it wrong. maybe all
    should be ‘nil’-ed on startup?)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Comments are closed.