{
"windows": [
{
"name": "ComboBoxExample",
"title": "ComboBox Example",
"left": 500,
"top": 100,
"width": 400,
"height": 300,
"controls": [
{
"name": "countryComboBox",
"type": "combobox",
"label": "Country",
"bindsTo": "country",
"getOptionsFunction": "getcountries"
},
{
"name": "OKButton",
"type": "button",
"text": "OK",
"isDialogButton": true,
"dialogResult": "OK"
},
{
"name": "CancelButton",
"type": "button",
"text": "Cancel",
"isDialogButton": true,
"dialogResult": "Cancel"
}
]
}
]
}
var countries = [
{ id: "", value: "" },
{ id: "be", value: "Belgium" },
{ id: "fr", value: "France" },
{ id: "it", value: "Italy" },
{ id: "nl", value: "Netherlands" }
];
redui.optionsBag.getcountries = function () {
return countries;
};
var exampleWindow = redui.createNewWindow("ComboBoxExample");
exampleWindow.bind(addressData);
exampleWindow.show();