Forum > LCL

TEdit enter

(1/2) > >>

captian jaster:
How do I set a Tedit so that when ENTER is pressed something is done..

typo:
On the OnKeyPress event of the TEdit:


--- Code: ---if Key = #13 then Do;

--- End code ---

JuhaManninen:
Even easier:


--- Code: ---Edit1.Default := True;

--- End code ---

Juha

mas steindorff:

--- Quote from: JuhaManninen on September 21, 2010, 05:42:49 pm ---Even easier:


--- Code: ---Edit1.Default := True;

--- End code ---

--- End quote ---
this is one I've not seen before and I get "no member" error when I try.  can you elaborate?

captian jaster:

--- Quote from: JuhaManninen on September 21, 2010, 05:42:49 pm ---Even easier:


--- Code: ---Edit1.Default := True;

--- End code ---

Juha


--- End quote ---
Same here...
I also have another question...
I have a TMemo box and a TEdit in my Form..
How can I make so that when the form loads the cursor automatically loads into the TEdit and not the TMemo

Navigation

[0] Message Index

[#] Next page

Go to full version