OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: mkweaver on May 13, 2009, 08:57:51 PM

Title: Looking for an example of a modeless dialog with a combobox
Post by: mkweaver on May 13, 2009, 08:57:51 PM
I am working on a modeless dialog with a combobox.  The only time I want the dialog to keep focus is when the combobox has focus.  I've not been able to achieve this.

I thought I could respond to the setfocus event, expecting it to fire when I clicked in the edit box, but clicking in the edit box doesn't seem to fire the setfocus event.

Any suggestions?

Thanks,
Mike
Title: Re: Looking for an example of a modeless dialog with a combobox
Post by: Fred Tomke on May 14, 2009, 04:09:04 AM
Hello mkweaver, I hope I understand you right but try a

Code (autolisp) Select
(dcl_Control_SetKeepFocus MyProj_MyForm T)

within c:MyProj_MyForm_MyCombobox_OnSetFocus and a

Code (autolisp) Select
(dcl_Control_SetKeepFocus MyProj_MyForm nil)

within c:MyProj_MyForm_MyCombobox_OnKillFocus. Please have a try with the attached sample. I hope that is what you're looking for.

Fred
Title: Re: Looking for an example of a modeless dialog with a combobox
Post by: mkweaver on May 15, 2009, 01:37:06 PM
Thanks, Fred.  That gave me exactly what I wanted.

Mike