Recent

Author Topic: DBGrid - change behavior of [home] and [end] keys  (Read 851 times)

Eloir

  • New member
  • *
  • Posts: 8
DBGrid - change behavior of [home] and [end] keys
« on: January 03, 2024, 03:31:45 pm »
I want to change the behavior of [home] and [end] keys when a cell is in Edit Mode, so that those keys don't move focus to first or last column, but insead move cursor to first or last character into the selected cell.
Just like it occours in Delphi. Is that possible?

Joanna

  • Hero Member
  • *****
  • Posts: 1463
Re: DBGrid - change behavior of [home] and [end] keys
« Reply #1 on: January 08, 2024, 12:16:29 pm »
Maybe experiment with overriding the dbgrid.onkeyup event procedure and detect if the key pressed is an end or home key.

I’m not sure how to set the cursor at the beginning or end of the string in the cell. Perhaps someone else here might know?

 

TinyPortal © 2005-2018