Erdem Cantürk February 2016

Smartface disable touchEnabled

I want to disable touchEnabled property of SliderDrawer1. But this is not working when I write this code. How can I do this? My codes as follows.

    function Page1_Self_OnShow() {

    var timeoutID = setTimeout(function () {
            setHello();
        }, 200);

    function setHello() {
    
        Pages.Page1.SliderDrawer1.touchEnabled=false;
        Pages.Page1.SliderDrawer1.show();
        cancelHello();
    }
    function cancelHello() {
        clearTimeout(timeoutID);
    } 
    
    }

Answers


Ed Glazer February 2016

It is native behaviour for SliderDrawer.So, yo can use Container or Rectangle, place it like sliderdrawer and add objects in Container as below:

var myContainerLayout = new SMF.UI.Container({
    top : "0%",
    left : "0%",
    width : "40%",
    height : "100%",
    backgroundTransparent : false,
    fillColor : SMF.UI.Color.black,
    });  

var myButton = new SMF.UI.TextButton({
        top : "10%",
        left : "5%",
        height : "15%",
        text : "button"
    });

Pages.Page1.add(myContainerLayout);
myContainerLayout.add(myButton);
}

Post Status

Asked in February 2016
Viewed 1,811 times
Voted 11
Answered 1 times

Search




Leave an answer