TField.DisplayWidth should have a storage directive
Original Reporter info from Mantis: TWhyman
-
Reporter name: Tony Whyman
Original Reporter info from Mantis: TWhyman
- Reporter name: Tony Whyman
Description:
As is already the case with TField.DisplayLabel, TField.DisplayWidth should be conditionally stored. i.e. if and only if the default has been overridden. This can be determined by a simple test FDisplayWidth <> 0.
The lack of a storage directive has two consequences:
-
Extra bloat in the .lfm
-
As the .lfm always contains a value for the DisplayWidth, when the component is loaded, the default is always overridden. So, if the programmer changes the field size, they must also change the displaywidth. For example, TStringField by default makes DisplayWidth = Size. However, this is only true at design time or for fields dynamically created at runtime.
Additional information:
Patch attached to add storage directive to TField.DisplayWidth
Mantis conversion info:
- Mantis ID: 27768
- OS: Linux Mint
- OS Build: 17
- Platform: AMD64
- Version: 2.6.4
- Fixed in version: 3.0.0
- Fixed in revision: 30468 (#5f1553c1)
- Target version: 3.0.0