Recent

Author Topic: How do I set focus for a component?  (Read 720 times)

shyub

  • Full Member
  • ***
  • Posts: 119
How do I set focus for a component?
« on: September 16, 2020, 08:51:01 am »
When sequentially placing several jEditText components on a form, after starting the application, the cursor is on the last jEditText. And how to programmatically make the cursor positioned on the first jEditText or even remove it?

RayoGlauco

  • Full Member
  • ***
  • Posts: 174
  • Beers: 1567
Re: How do I set focus for a component?
« Reply #1 on: September 16, 2020, 08:57:27 am »
Usually components that can receive focus have a method called SetFocus:
https://lazarus-ccr.sourceforge.io/docs/lcl/controls/twincontrol.setfocus.html
To err is human, but to really mess things up, you need a computer.

 

TinyPortal © 2005-2018