Notifications
Clear all
[Closed] Spinner Problem
Jan 19, 2006 3:43 pm
Hello.
I need your help.
I made a script with a spinner and a listbox.
I just want when i click on a selection in the listbox the value come in the spinner and when i change the value of the spinner the value of the selection in the listbox change too.
My code.
ListboxItems = #("1","5","14","24","26","36") Utility listmod "List modifier" ( label espbet " " height:3 listbox pass "Items:" items:listboxitems spinner offset "Modify :" type:#integer label espbet01 " " height:2 on pass selected LinkFrameNo do ( offset.value = listboxitems[LinkFrameNo] as integer if offset.value != listboxitems[linkframeNo] as integer then offset.value = listboxitems[LinkFrameNo] as integer )--end on pass on offset changed value do ( pass.selected LinkFrameNo = value )--end on offset )--end utility
There is an error in my code.
if i erase "on offset ... end on offset"
I get the value of the selected item in the spinner but when i modify the value in the spinner nothing happen in the listbox.
Do you have an idea to do it ?
Thank a lot for your help. :)
2 Replies
Jan 19, 2006 3:43 pm
The problem is in the spinner changed event handler. Should be like this:
on offset changed value do
(
pass.selected = value as string
)--end on offset
HalfVector.
Jan 19, 2006 3:43 pm
Hello halfvector.
Thanks a lot, it work perfectly :buttrock:
I donโt understand conversion in integer or string yet. ๐
But Halfvector is in the place to save my face !!
Thanks again :applause: