* * *

Author Topic: OnKeyPress/OnChange  (Read 1986 times)

cybertom

  • New member
  • *
  • Posts: 7
OnKeyPress/OnChange
« on: August 16, 2005, 02:55:13 pm »
Hi, i am using lazarus with Linux Kernel 2.6 (SuSE 9.3)

I have Problems on using this Actions: OnKeyPress, OnChange(Tedit field)
The procedures are not called. Why??

Is this a general Problem?
A Problem on my Computer only?
Or a Problem with Lazarus on Linux?

Can somebody test it and just tell me what happens??????????

Perhaps by creating a litle Aplication:
Form1,edit1, lable1.

Action: OnKeyPress(Form1)
begin
lable1.caption:='Key Pressed';
end;

Action: OnChange(edit1)
begin
lable1.caption:='Edit1 changed to: '+edit1.text;
end;

eric

  • Jr. Member
  • **
  • Posts: 94
RE: OnKeyPress/OnChange
« Reply #1 on: August 17, 2005, 11:06:33 am »
It works fine here on SuSE 9.3. With your little test application you will never see the caption 'Key Pressed' because it will immediately be overwritten by the OnChange event. Try having two separate labels to view the two events separately. Also note that OnKeyPress only responds to printable characters.
I presume that your misspelling of 'label' is just a typo in your message.

Eric

cyber-tom

  • Guest
OnKeyPress/OnChange
« Reply #2 on: August 18, 2005, 09:47:51 am »
well, i compiled it for Windows, and it runs like i expektet-
I have a very old platform here (Suse 9.3) and Pentium II 350 Mhz.

Perhaps I try at home again on Linux (SuSE 9.2- Kernel 2.6 smp Petium4 3.0gh-HT an 1gb RAM)

I just thought, that it is a special Problem on this old Plattform.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads