Check if the button's 'Default' property is set to true (True allows it
to be pseudo-clicked if enter is pressed) 

OR

Right-Click the button and use the 'Edit Button...' option.  Look at the
Keyboard interaction section of the properties and see if it is set to
be clicked if 'Enter' is pressed. (Default VCL Button Property Editor)
--------------------------
Keyboard Interaction
'Button clicked if __Enter / __Escape Pressed'
--------------------------



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Rainer von Saleski
Sent: Wednesday, December 14, 2005 12:02 PM
To: [email protected]
Subject: Unexpected Exit from ShowModal Form

I use ShowModal forms all over the place ... and they all have a button
that 
does some cleanup and sets ModalResult to mrOK in order to exit ... and
the 
button only activates when the user clicks it, or the button has the
focus 
and the user presses Return (I think).

But I have one form, not horribly complex, where pressing Return causes
the 
form to exit, no matter where the focus is (seemingly).  It has 2
TListViews 
(View Style = vsReport), 3 panels, a dozen buttons, half a dozen check 
boxes, one combo edit box, half a dozen labels, three timers, and a Rave

RvSystem.

Any ideas?  It's driving us nuts, because we "feel" like hitting Return
all 
too often.

Rainer

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to