Hi, I wrote a simple script to test undo in a rollout. Is it possible to undo anything ? Like the change of a spinner or a new line in a combobox. I know how to undo the creation of a box but nothing related to the rollout UI.
try(destroyDialog Combobox_rollout)catch()
rollout Combobox_rollout "ComboBox"
(
button btn_1 "Add" across:3
button btn_2 "Remove "
button btn_3 "Box"
combobox cbb items:#("line 1") height:9
spinner sp "spinner"
------------------------------------------------------------------------------------------------------------------------
fn AddLine cbb = (
temp = cbb.items
append temp "new line"
cbb.items = temp
)
fn DeleteLine cbb = (
if cbb.selection > 1 do (
temp = cbb.items
deleteItem temp cbb.selection
cbb.items = temp
)
)
------------------------------------------------------------------------------------------------------------------------
on Combobox_rollout open do (
clearlistener()
)
on cbb entered i do with undo on (
if i != "" and i != undefined then (
cbb.selected = i
)
)
on btn_1 pressed do (
undo on (
AddLine cbb
)
)
on btn_2 pressed do (
DeleteLine cbb
)
on btn_3 pressed do (
undo on (
box()
)
)
on sp changed i do with undo on (
print "TEST"
)
)
createDialog Combobox_rollout
By ZalitZ · 2018-01-09