0
votes

I am able to make window in Which I create label +textfields +buttons and open that window.

Now I am looking to make one pop up screen in which I have one label and one text field and two button cancel or ok .This pop up screen show when I click from window button .can you suggest me how to do this task ?

var infoWin = Titanium.UI.createWindow({
    backgroundColor: 'pink',
    top: 0,
    left: 0,
    width:200,
    height:200,
    opacity: 1,
    zIndex: 100
});

 var vw=Titanium.UI.createView({


 });
 var lab= Titanium.UI.createLabel({

    text:"ooooooo"

 });
 vw.add("lab");
 infoWin.add(vw);
infoWin.open({modal:true});

I am getting error on add statement I used like that on button click

1

1 Answers

0
votes

Your question is a little bit unclear. Do you mean you want a modal window to pop up? If so here is how you do that:

button.addEventListener('click', function(e) {
    // Create the window
    var popup = Ti.UI.createWindow();
    ... Add all your buttons here ...

    // Now open the window
    popup.open({ modal : true });
});