You can:```
try(destroydialog test1);catch()
rollout test1 “Group Test” width:165 height:85
(
–variable declaration
local variable1 = 10
local variable2 = “Variable declared in the rollout”
--function declaration
fn changeText txt =
(
test1.lb1.text = txt
)
--ui controls
label lb1 "Text" pos:[20,5]
button bt1 "New Text" pos:[20,25] width:125 height:25
button bt2 "More Text" pos:[20,55] width:125 height:25
--event handlers
on bt1 pressed do changeText "ABCD"
on bt2 pressed do changeText "1234"
)
createDialog test1
If you're using a rollout for your UI it's good practice to declare all your variables and functions within the rollout body. Then you won't need to use any global variables.