Recent

Author Topic: Tedit validate tab key  (Read 2653 times)

eldonfsr

  • Sr. Member
  • ****
  • Posts: 447
Tedit validate tab key
« on: January 25, 2015, 04:45:24 am »
Hello friends just a question how i can validate if the user press key tab, enter i can validate on keypress but tab dont fire such event is possible to validate that.

thanks.

kapibara

  • Hero Member
  • *****
  • Posts: 610
Re: Tedit validate tab key
« Reply #1 on: January 25, 2015, 08:52:13 am »
Try the OnKeyDown or OnKeyUp event. They work with keys like tab, F1, F2 and so on. I think OnKeyPress works only with characters.

Code: [Select]
if Key = VK_TAB then Key:= 0; //"Eat" the key
The VK_TAB constant is defined in the LCLTYPE unit.
Lazarus trunk / fpc 3.2.2 / Kubuntu 22.04 - 64 bit

eldonfsr

  • Sr. Member
  • ****
  • Posts: 447
Re: Tedit validate tab key
« Reply #2 on: January 25, 2015, 10:05:30 pm »
Thanks  for your help i be working on it and works great.

 

TinyPortal © 2005-2018