Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Setting visibility and opacity does not work with peer

    SmartClient Version: v9.1p_2015-09-16/Pro Development Only (built 2015-09-16)
    Any browser, any version

    I would like to initially hide a button that is being snapped onto an HTMLFlow. Adding the button as a peer of the HTMLFlow component is necessary to position the button appropriately with the snapTo property. However, adding it as a peer seems to ignore the visibility and opacity properties. Would this be considered a bug?

    Code:
    isc.HTMLFlow.create({
        ID: "hello",
        width: 5,
        styleName: "exampleTextBlock",
        contents: "<hr><span class='exampleDropTitle'>Ajax&nbsp;&nbsp;</span> <b>A</b>synchronous <b>J</b>avaScript <b>A</b>nd <b>X</b>ML (AJAX) is a Web development technique for creating interactive <b>web applications</b>.<hr>"
    });
    
    
    isc.Button.create({
        snapTo: "R",
        snapEdge: "L",
        ID: "hi",
        visibility: "hidden",
        opacity: 0
    });
    
    hello.addPeer(hi);

    #2
    Peers are automatically set to the master's visibility and opacity when first added and whenever the master is shown or hidden, or has opacity changed. So you could hide the peer after adding it, then keep in mind you will need to hide it again the master is hidden and re-shown and yet you want your button to remain hidden.

    Comment

    Working...
    X