Recent

Author Topic: [Solved] TBCButton tab stop  (Read 1275 times)

petevick

  • Sr. Member
  • ****
  • Posts: 427
[Solved] TBCButton tab stop
« on: March 07, 2022, 10:28:01 am »
I've just noticed that the TBCButton doesn't have a TabStop property. Does anyone know of a cheeky way of simulating the TabStop ??
« Last Edit: March 10, 2022, 09:04:37 pm by petevick »
Pete Vickerstaff
Linux Mint 21.3 Cinnamon, Windows 10, Lazarus 3.2, FPC 3.2.2

dseligo

  • Hero Member
  • *****
  • Posts: 1686
Re: TBCButton tab stop
« Reply #1 on: March 07, 2022, 10:45:40 am »
I use TBCButtonFocus for that.

And I change border style in Screen.OnActiveControlChange event, when it receives focus, something like that:
Code: Pascal  [Select][+][-]
  1. (ActiveControl as TBCButtonFocus).StateNormal.Border.Style:=bboSolid;

petevick

  • Sr. Member
  • ****
  • Posts: 427
Re: TBCButton tab stop
« Reply #2 on: March 07, 2022, 11:04:41 am »
I use TBCButtonFocus for that.

And I change border style in Screen.OnActiveControlChange event, when it receives focus, something like that:
Code: Pascal  [Select][+][-]
  1. (ActiveControl as TBCButtonFocus).StateNormal.Border.Style:=bboSolid;
Thanks for the reply. I wonder why the author put TabStop in TBCButtonFocus but not in TBCButton  %)
That's going to be pain to change my TBCButton's to TBCButtonFocus as I get an error when using Change Class  :(
Pete Vickerstaff
Linux Mint 21.3 Cinnamon, Windows 10, Lazarus 3.2, FPC 3.2.2

lainz

  • Hero Member
  • *****
  • Posts: 4743
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: TBCButton tab stop
« Reply #3 on: March 07, 2022, 02:28:37 pm »
I use TBCButtonFocus for that.

And I change border style in Screen.OnActiveControlChange event, when it receives focus, something like that:
Code: Pascal  [Select][+][-]
  1. (ActiveControl as TBCButtonFocus).StateNormal.Border.Style:=bboSolid;
Thanks for the reply. I wonder why the author put TabStop in TBCButtonFocus but not in TBCButton  %)
That's going to be pain to change my TBCButton's to TBCButtonFocus as I get an error when using Change Class  :(

Because focusable controls in LCL can't have full transparency. TBCButtonFocus can't have transparency like TBCButton.

 

TinyPortal © 2005-2018