View Issue Details

IDProjectCategoryView StatusLast Update
0034379LazarusLCLpublic2018-10-09 09:16
ReporterwpAssigned Towp 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
PlatformwindowsOSOS Version
Product VersionProduct Build 
Target Version1.10Fixed in Version 
Summary0034379: TBitBtn ignores the Margin property on Windows
DescriptionPositioning of glyph and caption of a TBitBtn can be constrolled by the properties Margin and Spacing.

In Delphi, Margin is the distance between edge of the TBitBtn and the icon unless Margin is -1 which centers the icon/caption, and Spacing is the distance between the icon and the caption unless Spacing is -1 - then the caption is centered within the space following the icon.

In Lazarus in Windows, however, Margin seems to be ignored: Whatever value is assigned to Margin the layout of glyph and caption does not change. In Linux (gtk2, qt), however, Margin behaves more or less like in Delphi.
Steps To ReproduceThe provided demo shows several instances of TBitBtn with various combinations of Margin and Spacing. This is from which the attached screenshots were generated.
Additional InformationThis seems to be a very old issue, it is already seen in Laz 1.0 (or maybe even older).

This report is based on a forum post: https://forum.lazarus.freepascal.org/index.php/topic,42768.msg298755
TagsNo tags attached.
Fixed in Revisionr59270
LazTarget1.10
WidgetsetWin32/Win64
Attached Files

Relationships

has duplicate 0025632 resolvedBart Broersma BitBtn.Margin - no change in glyph/caption position when value (margin) changed. 

Activities

wp

2018-10-03 19:41

developer  

TBitBtn_MarginSpacing.zip (2,552 bytes)

wp

2018-10-03 19:42

developer  

wp

2018-10-03 19:42

developer  

wp

2018-10-03 19:42

developer  

wp

2018-10-03 19:43

developer  

wp

2018-10-08 12:38

developer   ~0111320

Fixed in widgetset.

Issue History

Date Modified Username Field Change
2018-10-03 19:41 wp New Issue
2018-10-03 19:41 wp File Added: TBitBtn_MarginSpacing.zip
2018-10-03 19:42 wp File Added: Delphi_BitBtn_MarginSpacing.png
2018-10-03 19:42 wp File Added: Laz_Win_BitBtn_MarginSpacing.png
2018-10-03 19:42 wp File Added: Laz_gtk2_TBitBtn_MarginSpacing.png
2018-10-03 19:43 wp File Added: Laz_qt_TBitBtn_MarginSpacing.png
2018-10-03 19:44 wp Additional Information Updated View Revisions
2018-10-08 12:38 wp Fixed in Revision => r59270
2018-10-08 12:38 wp LazTarget - => 1.10
2018-10-08 12:38 wp Note Added: 0111320
2018-10-08 12:38 wp Status new => resolved
2018-10-08 12:38 wp Resolution open => fixed
2018-10-08 12:38 wp Assigned To => wp
2018-10-08 12:38 wp Target Version => 1.10
2018-10-08 15:02 Bart Broersma Relationship added has duplicate 0025632
2018-10-09 09:16 wp Status resolved => closed