2017년 6월 8일 목요일

Changing hint box values using variables


Hello, I have read most of the chapters in the book and have learned much from it. I need to review. A lightbulb is going on in my head but flickering.
I just have not connected the dots yet.

Anyway what I am trying to to is change the text of the hint in the text box using variables.
I have a "Spinner list" with four items and a TxtBoxHint list.
What I want to happen is if I select, say item 2 from the Spinner, the hint from TxtBoxHint will update accordingly..
Thanks for any guidance you can provide
--
Here is an example of button click.
Do it individually for each sprite just like you would a button.  I like to use labels myself, as they cannot be typed into by the user, but maybe you want that.

--
Here is an example of changing a label. Attached aia file for you.


--
The only reason I did not want to do it that way is the user will be selecting spinner options more than once. I figured i could save time and hassle by having it input the correct texthint based on what spinner option they choose. 

Thanks, I'll keep it in mind if i don't  find another way

--
use the Textbox.Hint property and set it to the corresponding item from list TxtBoxHint using the Spinner.SelectionIndex

--
I'll give it a try, Thanks

--
Nice, thanks Taifun!  I just learned something new, yay!  I was thinking the hint and text were the same, but I see that they are not now.  And also there are no hints for a label I found out as I assumed there were, regardless I see the difference betwixt..

--
Ugh...Do you happen to have a photo of these blocks set up?

--
How about you let us see your aia file?  If not post your sprite blocks.

--
I'll get them up

--
The top set of blocks just puts the actual number as the hint.
The bottom set I had to use the text box to get it input what i wanted into the text hint field
Not sure how to call the variable so when I select fruit, grapes or whatever shows as the hint

Thanks for any help. Taifu apparently has a solution but am confused how to set it up


--
I figured it out .I think. Need to test but seems to be working

--

댓글 없음:

댓글 쓰기