Recent

Author Topic: OnKeyDown absent in TScrollBox  (Read 4561 times)

Shebuka

  • Sr. Member
  • ****
  • Posts: 429
OnKeyDown absent in TScrollBox
« on: March 02, 2012, 03:01:19 pm »
Subject is talking by himself :) Why there is no OnKeyDown in TScrollBox?

Laz SVN and FPC 2.6

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: OnKeyDown absent in TScrollBox
« Reply #1 on: March 02, 2012, 03:17:54 pm »
There is OnKeyDown, but it is not published. TScrollBox is derived from TCustomControl.
Maybe you can try assign something (in code).
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Shebuka

  • Sr. Member
  • ****
  • Posts: 429
Re: OnKeyDown absent in TScrollBox
« Reply #2 on: March 02, 2012, 04:01:16 pm »
There is OnKeyDown, but it is not published. TScrollBox is derived from TCustomControl.
Maybe you can try assign something (in code).

This trick works, but i don't understand why if it's not assigned it doesn't pass the keydown event to it's parent (in my case Form, wich has keydown assigned), i know that for example timage pass keydown event automatically to it's parent.

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: OnKeyDown absent in TScrollBox
« Reply #3 on: March 02, 2012, 04:09:25 pm »
TImage is derived from TGraphicControl (a "lightweight" component).

Did you assign property Form.Keypreview to True ?
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Shebuka

  • Sr. Member
  • ****
  • Posts: 429
Re: OnKeyDown absent in TScrollBox
« Reply #4 on: March 02, 2012, 07:01:29 pm »
TImage is derived from TGraphicControl (a "lightweight" component).

Did you assign property Form.Keypreview to True ?
No, it's false in the form with image and it's also false in the form with scrollbox

 

TinyPortal © 2005-2018