Wil een nieuw item aan list- of combobox toevoegen [code][/code] tijdens uitvoer programma
De helpfile's (nederlands) maken hierover niets duidelijk, ofwel ik kan het niet vinden,
'COMBOBOX.BAS - a short combobox demo
WindowWidth = 360
WindowHeight = 270
' helpt ook niet ------------
dim array(10)
'-------------------------
array$(0) = "This"
array$(1) = "is"
array$(2) = "a"
array$(3) = "test"
array$(4) = "of"
array$(5) = "the"
array$(6) = "emergency"
array$(7) = "broadcast"
array$(8) = "system"
'----------------------------------
'Nieuwe array
array$(9) = " "
'-----------------------------------
combobox #main.testcb, array$(), [selected], 26, 16, 136, 200
textbox #main.index, 182, 16, 136, 25
button #main, "Accept Selection", [accept], UL, 182, 51, 136, 25
statictext #main.instruct, "Hey", 182, 86, 136, 200
open "untitled" for dialog as #main
instruct$ = "Select an item in the combobox and watch the " + _
"number change, then change the number and hit Accept " + _
"Selection go the other way."
print #main.instruct, instruct$
'wait here for input event
wait
[selected] 'Perform action for the combobox named 'testcb'
print #main.testcb, "selectionindex? xVar"
print #main.index, str$(xVar)
wait
[accept] 'Perform action for the button named 'accept'
' print #main.index, "!contents? yVar"
' print #main.testcb, "selectindex "; yVar
'--------------------------------------------------
' Vullen nieuwe ARAY
print #main.index, "!contents? array$(9)"
print array$(9)
'HOE KRIJG IK EEN NIEUW ITEM IN EEN LIST- OF COMBOBOX TIJDENS UITVOEREN PROGRAMMA
print #main.index, "!contents?"
print #main.index, array$(9)
'Volgens err.log Runtime error: bad variable name: array$(9)
'-----------------------------------------------
wait