Notifications
Clear all
[Closed] changing a label
Aug 27, 2007 3:18 pm
Hi there, quite the stupid question here I guess, but Im not sure what to do.
So… I want to create a label in a rollout that changes when a the user changes the value of a spinner.
But how do I change a label (or something else that will take no input)?
3 Replies
1 Reply
Change the .text property of the label. Or its alias, .caption.
You can do this with any UI control that shows a label, incl. Buttons, Checkboxes, Dropdownlists, Spinners etc. Be aware that some of them will format the label based on the original label assigned, so changing a very short text with a rather long one might screw the alignment of the text. But for labels that have nothing but a text to display it should be ok.
rollout test "Test"
(
spinner spn_spin "Spin me"
label lbl_value "No Value"
on spn_spin changed val do lbl_value.text = "Value is " + val as string
)
createDialog test 200 50