A problem about combobox,textbox and grid

Started by aoxiangzcr, December 12, 2007, 03:57:19 AM

Previous topic - Next topic

aoxiangzcr

Hello, everyone.I have a problem about combobox,textbox and grid.When the focs in these control,I press the "Enter" Key,the form closed.My problem is that how can I catch the "Enter" key?And What can I do about it ?
Regards,
Aoxiangzcr
God helps those who help themselves!

Kelie

Quote from: aoxiangzcr on December 12, 2007, 03:57:19 AM
Hello, everyone.I have a problem about combobox,textbox and grid.When the focs in these control,I press the "Enter" Key,the form closed.My problem is that how can I catch the "Enter" key?And What can I do about it ?
Regards,
Aoxiangzcr

Try setting the "ReturnAsTab" property to True.

aoxiangzcr

Quote from: Kelie on December 12, 2007, 08:29:35 AM
Try setting the "ReturnAsTab" property to True.
At first ,thank you,Kelie.I try your said,and I have solved the problem about combobox and textbox.But the same problem about Grid have not be solved.Is there any way alse I can test?
God helps those who help themselves!

Kelie

Quote from: aoxiangzcr on December 12, 2007, 06:22:52 PM
At first ,thank you,Kelie.I try your said,and I have solved the problem about combobox and textbox.But the same problem about Grid have not be solved.Is there any way alse I can test?

i haven't used grid from OpenDCL myself. hopefully someone else with experience can help you. btw, you're welcome.

owenwengerd

Quote from: aoxiangzcr on December 12, 2007, 03:57:19 AM
My problem is that how can I catch the "Enter" key?And What can I do about it ?

I think the best way to deal with this is to handle the OnCancelClose event for the form, and return T to prevent the form from closing if the focus is on one of the controls you're concerned with.

aoxiangzcr

God helps those who help themselves!

owenwengerd


aoxiangzcr

I will try it again by myself,by the way,thank you.
God helps those who help themselves!

Kelie

Quote from: owenwengerd on December 12, 2007, 09:44:13 PM
I think the best way to deal with this is to handle the OnCancelClose event for the form, and return T to prevent the form from closing if the focus is on one of the controls you're concerned with.

Owen,

Is there a function in OpenDCL that can determine which control currently has the focus?

Thanks!

BazzaCAD

Quote from: Kelie on December 13, 2007, 09:09:25 PM
Quote from: owenwengerd on December 12, 2007, 09:44:13 PM
I think the best way to deal with this is to handle the OnCancelClose event for the form, and return T to prevent the form from closing if the focus is on one of the controls you're concerned with.

Owen,

Is there a function in OpenDCL that can determine which control currently has the focus?

Thanks!

Here ya go...

Method GetFocus as List of Strings

This method will return a list indicating the project name, dialog box name and the name of the control that has the current focus. If the control name is blank then the dialog box has the focus.

AutoLISP Syntax:
(Setq rValue (dcl_GetFocus))
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

JTHWAMAN

How utilizes (dcl_GetFocus)?
May provide the model?
Thanks~