Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would you please add an example how to use it? #3

Open
zabady opened this issue Feb 20, 2015 · 2 comments
Open

Would you please add an example how to use it? #3

zabady opened this issue Feb 20, 2015 · 2 comments

Comments

@zabady
Copy link

zabady commented Feb 20, 2015

No description provided.

@PierreGUI
Copy link

Hey, here is a quick example:

config.json:

"dependencies": {
        "rebel.textArea": "1.2"
}

yourView.xml:

<Widget src="rebel.TextArea" id="inputMessage" />

yourStyle.tss:

"#inputMessage": {
    scrollable: true,
    suppressReturn: false,
    backgroundColor: '#fff',
    borderColor: '#8d8',
    borderRadius: 3
},

yourController.js:

$.inputMessage.focus(); // Will focus the textArea
$.inputMessage.blur(); // Will blur the textArea
// Will listen for change and display the TextArea current content
$.inputMessage.addEventlistener("change", function(evt) {
    Ti.API.info('What's in the box:', $.inputMessage.value);
});

Cheers

@timanrebel
Copy link
Owner

thanks @PierreGUI, sorry for not getting back to you @zabady

In yourController.js, also call:

$.inputMessage.construct();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants