2017년 1월 8일 일요일

make list of buttons


i have 20 buttons for exemple. and 20 sounds.
هi want to  make a list of buttons and sounds in order to play (x sound) when we click (x button) by order
I made list of sounds. but how to make list of buttons? and how to make sounds play in the same order of buttons in list?

--
Here are two solutions:

With this one you don't need the list of sounds:

:
etc.

With this one you use your list of sounds and match the index to each sound in the sounds list to it's correct button:

Unless you anticipate having to edit the sounds list down the road, I would use the first solution.

-- 
thanks Mr Scott. so this mean that i repeat (when - button x - click) 20 time

-- 
A ListView showing a list of 20 sound names acts like 20 buttons.
Keep the sound names and their sound file names in the same order,
and use the SelectionIndex to look up the sound to play.

-- 
thank you so much Mr Abrham

-- 


댓글 없음:

댓글 쓰기