Recent

Author Topic: TBCButtonFocus TabStop property  (Read 1176 times)

petevick

  • Sr. Member
  • ****
  • Posts: 419
TBCButtonFocus TabStop property
« on: March 14, 2022, 08:11:44 am »
I don't know if this is a known problem but when a TBCButtonFocus TabStop property is set to False it's not written to the unit lfm file, and I mean it's missing, if it's set to True then it is written. This means that you can be happily changing a load of TBCButtonFocus buttons tabstop to false at design time, save your project, the next time you open that project all of those button tabstop property will be back to true. It's at that point you question your sanity  %) %) %)
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Windows 10, Lazarus 3.2, FPC 3.2.2

lainz

  • Hero Member
  • *****
  • Posts: 4738
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: TBCButtonFocus TabStop property
« Reply #1 on: March 14, 2022, 01:59:58 pm »
I have no idea, it should work since it's just a property we inherit from TCustomControl.

petevick

  • Sr. Member
  • ****
  • Posts: 419
Re: TBCButtonFocus TabStop property
« Reply #2 on: March 14, 2022, 02:08:42 pm »
I have no idea, it should work since it's just a property we inherit from TCustomControl.
I don't suppose it could be a problem with the TCustomControl could it?
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Windows 10, Lazarus 3.2, FPC 3.2.2

lainz

  • Hero Member
  • *****
  • Posts: 4738
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: TBCButtonFocus TabStop property
« Reply #3 on: March 14, 2022, 02:12:00 pm »
I have no idea, it should work since it's just a property we inherit from TCustomControl.
I don't suppose it could be a problem with the TCustomControl could it?

No, me neither, because all controls must be failing if that's the case.

lainz

  • Hero Member
  • *****
  • Posts: 4738
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: TBCButtonFocus TabStop property
« Reply #4 on: March 14, 2022, 02:14:30 pm »
In the constructor of TBCButtonFocus is this line:

Code: Pascal  [Select][+][-]
  1. TabStop := True;

Maybe that overrides the lfm saved property.

Try removing that line and rebuild lazarus. If it works for you I will change the sourcecode.

Thaddy

  • Hero Member
  • *****
  • Posts: 18356
  • Here stood a man who saw the Elbe and jumped it.
Re: TBCButtonFocus TabStop property
« Reply #5 on: March 14, 2022, 02:16:13 pm »
maybe a missing stored specifier? https://www.freepascal.org/docs-html/ref/refsu38.html
e.g:
Code: Pascal  [Select][+][-]
  1. property TBCButtonFocus .Tabstop:boolean read FTabstop write ftabstop stored true;
or something.
« Last Edit: March 14, 2022, 02:21:39 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

petevick

  • Sr. Member
  • ****
  • Posts: 419
Re: TBCButtonFocus TabStop property
« Reply #6 on: March 14, 2022, 03:02:12 pm »
In the constructor of TBCButtonFocus is this line:

Code: Pascal  [Select][+][-]
  1. TabStop := True;

Maybe that overrides the lfm saved property.

Try removing that line and rebuild lazarus. If it works for you I will change the sourcecode.
Yes, that seems to have fixed it, although there is no...
Code: Pascal  [Select][+][-]
  1. TabStop := False;
...line written to the lfm file to signify the False property state (the TabStop := True; line is written), but at least when you close/reopen Laz the TabStop property retains it's saved state.
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Windows 10, Lazarus 3.2, FPC 3.2.2

 

TinyPortal © 2005-2018