Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Thread Tools Display Modes
Old 01-06-2001, 02:25 PM
elif elif is offline
Junior Member
Join Date: Jan 2001
Posts: 8
Default Edit Box

I wanto take anything from user ,write to editbox, after
finishing writing just press enter and for example something is active?
Anybody know how that
Reply With Quote
Old 01-06-2001, 07:39 PM
douglas douglas is offline
Senior Member
Join Date: Jul 2001
Posts: 7,695
Default RE: Edit Box

Your question seems simple as far as I understand what you are saying.

Just place code on the OnKeyPress Event like this:

if Key = #13 then
Key := #0;
CheckBox1.Checked := True;

Write in any code you want once they push enter. #13 is the enter key in ASCII.
Reply With Quote
Old 01-07-2001, 09:31 PM
digitiger digitiger is offline
Senior Member
Join Date: Jan 2001
Posts: 716
Default RE: RE: Edit Box

the first answere solves the problem but just in case you need something else
then instead of checkbox1.checked you can say
if ord(key) = 13 then // check if enter key is pressed
key = #0 // avoid a beep which comes by default if enter is pressed in edit control

button1.setfocus // to move focus to some other control
edit1.color := clwindow // to change the color of editbox
edit2.setfocus // to set the focus to next edit box
edit2.color := claqua //to change the color of next editbox
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT. The time now is 10:30 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.