aUCBLogo Demos and Tests / listboxtest
be listboxtest
be lbSelect
(show "MyListBox ListBoxSelections)
end
f=Frame [][MyFrame]
wxDefault_Frame_Style+wxStay_on_Top
[400 300][300 400]
lb=(ListBox f [MyListBox]
[ [String 1]
[and a second string]
[and the last string]
]
[ lbSelect
]
[ pr [Doubleclick]
]
wxLB_single [-1 -1][-1 -1])
lb2=(ListBox f [MyListBox2]
[ [String 1]
[and a second string]
[a third string]
[and the last string]
]
[ (show "MyListBox2 ListBoxSelections)
]
[ pr [Doubleclick]
]
wxLB_multiple)
bappend=Button f [&append item]
[ ListBoxAppend lb se [and another item] gensym
]
bdelete=Button f [&delete last item]
[ if (ListBoxCount lb) > 0
[ ListBoxRemoveItem lb (ListBoxCount lb)-1
]
]
bs=BoxSizer wxVertical
BoxSizerAdd bs lb 1000 wxExpand 0
BoxSizerAdd bs lb2 500 wxExpand 0
bs2=BoxSizer wxHorizontal
BoxSizerAdd bs2 bappend 1 wxExpand 0
BoxSizerAdd bs2 bdelete 1 wxExpand 0
BoxSizerAdd bs bs2 100 wxExpand 0
FrameSetSizer f bs
end