TWinControl.CanFocus returns true for controls on invisible forms.

TWinControl.CanFocus returns true for controls on invisible forms.

I haven't found this issue at quality so I decided to resend it. It drives me mad all the time I use CanFocus/SetFocus. Feel free to upvote the issue :)
https://quality.embarcadero.com/browse/RSP-11285

Comments

  1. Yep, been running into this a lot, quite annoying.

    ReplyDelete
  2. Funfact: While VCL throws exceptions in SetFocus, .Net does NOT. And Windows allows setting focus to an invisible control :P

    ReplyDelete
  3. Alexander Benikowski
    Of course Windows does, it's just a PostMessage(WM_SETFOCUS)

    ReplyDelete

Post a Comment