May be like this, untested. LIST1=: 0 : 0 pc list1; menupop "File"; menu new "&New" "" "" ""; menu open "&Open" "" "" ""; menusep; menu exit "&Exit" "" "" ""; menupopz; xywh 136 23 44 12;cc cancel button;cn "Cancel"; xywh 64 1 60 60;cc bxlist listbox; xywh 0 0 60 12;cc name edit; pas 6 6;pcenter; rem form end; )
list1_run=: 3 : 0 wd LIST1 NB. initialize form here list=.;:'apples bananas cherries dates' wd 'set bxlist ',;list, each LF wd 'pshow;' ) list1_close=: 3 : 0 wd'pclose' ) list1_cancel_button=: list1_close list1_exit=: list1_close list1_bxlist_button=: 3 : 0 wd 'set name *',bxlist ) list1_bxlist_select=: list1_bxlist_button list1_run'' Ср, 09 окт 2013, adam dunne писал(а): > Yea, sorry should have included all code. See below: > > LIST1=: 0 : 0 > pc list1; > menupop "File"; > menu new "&New" "" "" ""; > menu open "&Open" "" "" ""; > menusep; > menu exit "&Exit" "" "" ""; > menupopz; > xywh 136 8 44 12;cc ok button;cn "OK"; > xywh 136 23 44 12;cc cancel button;cn "Cancel"; > xywh 64 1 60 60;cc bxlist listbox; > xywh 0 0 60 12;cc name edit; > pas 6 6;pcenter; > rem form end; > ) > > list1_run=: 3 : 0 > wd LIST1 > NB. initialize form here > wd 'pshow;' > ) > > list1_close=: 3 : 0 > wd'pclose' > ) > > list1_cancel_button=: 3 : 0 > list1_close'' > ) > > list1_ok_button=: 3 : 0 > NB.wd'cc bxlist listbox ws_vscroll lbs_multiplesel' > list=.;:'apples bananas cherries dates' > wd 'set bxlist ',;list, each LF > ) > > list1_name_button=: 3 : 0 > wd 'set name ',bxlist > ) > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm -- regards, ==================================================== GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
