Recent

Author Topic: [Solved] Some BGRAControls missing BorderSpacing  (Read 1930 times)

dsiders

  • Sr. Member
  • ****
  • Posts: 372
[Solved] Some BGRAControls missing BorderSpacing
« on: January 07, 2019, 02:45:59 pm »
I recently was working with TFlowPanel to handle automatic layout of controls. Using this component, you need to rely on the BorderSpacing property to fine-tune the appearance of controls on the layout panel.

Unfortunately, there are a couple of BGRAControls that do not publish the BorderSpacing property: TBCSVGViewer and TBCSVGButton.

Is this an over-sight, or by design?

BTW, TFlowPanel doesn't publish BorderSpacing either.

« Last Edit: January 08, 2019, 12:11:42 pm by dsiders »
Lazarus 2.1 (SVN) / FPC 3.0.4 / FPC 3.2.0 / x86-win64 / Windows 8.1

josh

  • Hero Member
  • *****
  • Posts: 786
Re: Some BGRAControls missing BorderSpacing
« Reply #1 on: January 07, 2019, 03:28:11 pm »
Hi If you open the file bcsvgbutton.pas and to the list of properties
Code: Pascal  [Select][+][-]
  1.   property BorderSpacing;
  2.   property Constraints;

Save the file, and rebuild the ide, on ide restart the properties should become visible.

This will add the BorderSpacing and the Constraints Property.

Hope that helps.
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

dsiders

  • Sr. Member
  • ****
  • Posts: 372
Re: Some BGRAControls missing BorderSpacing
« Reply #2 on: January 07, 2019, 03:48:59 pm »
Hi If you open the file bcsvgbutton.pas and to the list of properties
Code: Pascal  [Select][+][-]
  1.   property BorderSpacing;
  2.   property Constraints;
  3.  

Save the file, and rebuild the ide, on ide restart the properties should become visible.

This will add the BorderSpacing and the Constraints Property.

Hope that helps.

Yes, I had done that to my local copy. But I was hoping the change could (or would) be included in the original library too.
Lazarus 2.1 (SVN) / FPC 3.0.4 / FPC 3.2.0 / x86-win64 / Windows 8.1

ps

  • Full Member
  • ***
  • Posts: 129
    • CSS
Re: Some BGRAControls missing BorderSpacing
« Reply #3 on: January 07, 2019, 03:49:32 pm »
BTW, TFlowPanel doesn't publish BorderSpacing either.
It's fixed https://bugs.freepascal.org/view.php?id=34729 and available in RC3
Small simple CSS/box model implementation: https://github.com/pst2d/csscontrols/tree/dev

dsiders

  • Sr. Member
  • ****
  • Posts: 372
Re: Some BGRAControls missing BorderSpacing
« Reply #4 on: January 07, 2019, 03:53:24 pm »
BTW, TFlowPanel doesn't publish BorderSpacing either.
It's fixed https://bugs.freepascal.org/view.php?id=34729 and available in RC3

Good to know. Thank you.
Lazarus 2.1 (SVN) / FPC 3.0.4 / FPC 3.2.0 / x86-win64 / Windows 8.1

lainz

  • Hero Member
  • *****
  • Posts: 3698
  • Leandro Diaz
Re: Some BGRAControls missing BorderSpacing
« Reply #5 on: January 07, 2019, 04:44:12 pm »
Done, I've added these properties in development branch of bgracontrols.

dsiders

  • Sr. Member
  • ****
  • Posts: 372
Re: Some BGRAControls missing BorderSpacing
« Reply #6 on: January 07, 2019, 05:04:54 pm »
Done, I've added these properties in development branch of bgracontrols.

Thank you very much.

Lazarus 2.1 (SVN) / FPC 3.0.4 / FPC 3.2.0 / x86-win64 / Windows 8.1

 

TinyPortal © 2005-2018