Notifications
Clear all
[Closed] Mass assigning button.caption
Apr 11, 2008 6:05 pm
Hi,
my first question is, why a function cannot access User Interface Items? Or I’m doing something wrong with:
(
global textvar = "Press Me"
rollout MyRollout "xyz"
(
button bTest "Testbutton"
)
fn test =
(
bTest.caption = textvar
)
test()
createdialog MyRollout
)
?
My real problem is that i want assign over 80 buttons a name on a mouseclick. How can this be done?
2 Replies
Apr 11, 2008 6:05 pm
You can access the button from the function like this:
(
textvar = "Press Me"
rollout MyRollout "xyz"
(
button bTest "Testbutton"
)
fn test =
(
MyRollout.bTest.caption = textvar
)
test()
createdialog MyRollout
)
You can also put the function itself inside the rollout, like so:
(
textvar = "Press Me"
rollout MyRollout "xyz"
(
button bTest "Testbutton"
fn test =
(
bTest.caption = textvar
)
on myRollout open do test()
)
createdialog MyRollout
)