Recent

Author Topic: DBGrid - change behavior of [home] and [end] keys  (Read 710 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: 1429
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?
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

 

TinyPortal © 2005-2018