Salutations,
It's been a while since I've written some new OpenDCL stuff ...
Is there a built in way to catch ENTER in a ComboBox.
It seems there is no Key events associated.
I may be able to hack it by :
Setting ReturnAsTab to false.
Catch the OnCancelClose event for the form
Determine the control with the current focus ie (Setq rValue (dcl_GetFocus))
If this identifies the control I want to "handle" ENTER for, go ahead and handle it.
Of course, I'd rather use a built in Method if one exists :)
Regards,
This works (tested on BricsCAD):
Set ReturnAsTab to True for the control.
In the control's OnKillFocus event handler check the keystate of the Enter key:
(if (vl-position (acet-sys-keystate 13) '(-127 -128))
(progn
(princ "\nFocus removed by pressing Enter ")
; Do something.
)
(progn
(princ "\nFocus removed ")
; Do something else.
)
)
Thanks Roy,
I can probably make that work for my situation.
I'll have a play.