Lazarus

Programming => LCL => Topic started by: EganSolo on March 01, 2021, 09:52:46 am

Title: TDateCellEditor: a date editor for grids
Post by: EganSolo on March 01, 2021, 09:52:46 am
I'd like to add a custom date editor by leveraging TDateEdit found on the Misc palette. My challenge is to get the editor to respond to VK_DOWN, VK_UP, etc. I know of two ways that work (column 0 and 2 in my project), one that doesn't work (column 1) and a fourth that should work but doesn't  ::)
Title: Re: TDateCellEditor: a date editor for grids
Post by: jamie on March 02, 2021, 12:55:09 am
my guess is its a composite control which means you aren't seeing the TEDIT part of the TDATEedit but the control it lives on.

I didn't look at the source so I can only bet that its a TPanel.

In which case the TEDIT has the focus and you aren't getting jack!

I suppose the TEDIT part could of called the KeyDown but it looks like it maybe calling the OnKeyDown event instead to emulate a key press for user code..

 Instead of overriding the KeyDown implement a OnKeyDown that carries the (Sender:.....) and set it...
TinyPortal © 2005-2018