StaticText Control Example

This example explains how to create a simple window with StaticText control, bind to the data and show on the screen.

See interactive example on http://www.redui.net

UI Model

{
    "windows": [
        {
            "name": "StaticTextExample",
            "title": "StaticText Example",
            "left": 500,
            "top": 100,
            "width": 400,
            "height": 300,
            "controls": [
                {
                    "name": "infoStaticText",
                    "type": "statictext",
                    "bindsTo": "text"
                },
                {
                    "name": "OKButton",
                    "type": "button",
                    "text": "Yes",
                    "isDialogButton": true,
                    "dialogResult": "OK"
                },
                {
                    "name": "CancelButton",
                    "type": "button",
                    "text": "No",
                    "isDialogButton": true,
                    "dialogResult": "Cancel"
                }
            ]
        }
    ]
}

Data Model

var info = {
	text: "Are you sure?"
};

Code

var exampleWindow = redui.createNewWindow("StaticTextExample");
exampleWindow.bind(info);
exampleWindow.show();


.

Last edited Nov 19, 2013 at 1:35 PM by artemkv, version 1

Comments

No comments yet.