1

Is there anyway to get the textual chosen "word" to display in the spinner UI element as one flips through?

Whenever the user enters an up or down key the gosub display is called. So far though i have found only ways to display the index not the value...

#a::
words:= ["in","the","beginning","was","the","word"]

Gui, Add, Edit, w111 R1 vw, words3
Gui, Add, UpDown, w22 gdisplay vn Range1-6, 3

Gui, Show, x933 y0, test word display
return

display:
UD:=n
word:=words[UD]
n:=word
;Gui, Submit, NoHide
return
emanuensis
  • 133
  • 2
  • 10

1 Answers1

0

How about using a ListBox instead:

Gui, Add, ListBox, R1 vMyList -VScroll, in|the|beginning|was|the|command|line
Gui, Add, UpDown, gDisplay
Gui, Show, , test word display

Exit

Display:
    Gui, Submit, NoHide
    ; MsgBox % MyList
return
MCL
  • 3,985
  • 3
  • 27
  • 39
  • Well that shows it is possible! Thanks. The next issue is how to get a variable list back in there. Eg the following failed. words:= in|the|beginning|was|the|word|and|the|word|was|rePsychaled Gui, Add, ListBox, r1 vsel -VScroll, words Gui, Add, UpDown, gDisplay Gui, Show, x933 y0, test word display Exit Display: Gui, Submit, NoHide MsgBox % sel return NB. The very first computers did not have command lines... – emanuensis Jul 07 '13 at 20:17
  • sorry comments totally messed up by SW and i cannot post a good format for 8 hours.... sigh. – emanuensis Jul 07 '13 at 20:27
  • @emanuensis You have to enclose variables in percent signs in order to interpret their contents: `%words%` – MCL Jul 07 '13 at 20:59