The button event runs on the enter keypress while the control is active. I use it often.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sherlock, Ric Sent: Sunday, September 28, 2008 18:17 To: Programming forum Subject: [Jprogramming] Combolist control and button event What would I use the "button" event for on a combolist control? When should the "button" event fire for a combolist control? As far as I can ascertain (from CONTROLS_jformedit_) the combolist control supports both a "button" and a "select" event. The default event type seems to be "button", because that is the event type created in my script when I click the "Code..." button in the properties dialog for this type of control. However I'm not sure how to make this event "fire". A "button" event controller doesn't seem to respond to clicking on the control anywhere. I can get the "select" event and handler to respond to chosing a item from the list fine. The following script creates a simple form illustrating this: TEST=: 0 : 0 pc test; xywh 143 21 44 12;cc ok button;cn "OK"; xywh 143 36 44 12;cc cancel button;cn "Cancel"; xywh 76 8 60 60;cc cblTest combolist; pas 6 6;pcenter; rem form end; ) test_run=: 3 : 0 wd TEST wd 'set cblTest "Oranges" "Apples" "Apricots" "Bananas"' wd 'setselect cblTest 0' wd 'pshow;' ) test_close=: 3 : 'wd''pclose''' test_cancel_button=: test_close test_cblTest_button=: 3 : 0 wd 'mb "Button" "The button event fired"' ) test_cblTest_select=: 3 : 0 wd 'mb "Select" "The select event fired"' ) test_run'' ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
