View Issue Details

IDProjectCategoryView StatusLast Update
0024633LazarusLCLpublic2014-01-18 15:08
ReporterwpAssigned ToBart Broersma 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1 (SVN)Product Build 
Target VersionFixed in Version1.1 (SVN) 
Summary0024633: Right-align numbers in TSpinEdit and TFloatSpinEdit
DescriptionIn many applications numerical input fields show the numbers right-aligned. The numerical edit boxes in Lazarus, TSpinEdit and TFloatSpinEdit, are left-aligned only. The functionality for center and right alignment, however, is already available in their ancestor, TCustomEdit. Please, publish the property "Alignment" to make this feature available.
Additional InformationThe attached patch makes the inherited property "Alignment" a published property.
TagsNo tags attached.
Fixed in Revisionr41805
LazTarget-
Widgetset
Attached Files
  • spin.pp.patch (461 bytes)
    Index: spin.pp
    ===================================================================
    --- spin.pp	(revision 41784)
    +++ spin.pp	(working copy)
    @@ -68,6 +68,9 @@
         property MaxValue: Double read FMaxValue write SetMaxValue;
         property Value: Double read GetValue write SetValue;
         property ValueEmpty: Boolean read FValueEmpty write SetValueEmpty default False;
    +  published
    +    // inherited
    +    property Alignment;
       end;
       
       { TFloatSpinEdit }
    
    spin.pp.patch (461 bytes)

Activities

wp

2013-06-21 20:17

developer  

spin.pp.patch (461 bytes)
Index: spin.pp
===================================================================
--- spin.pp	(revision 41784)
+++ spin.pp	(working copy)
@@ -68,6 +68,9 @@
     property MaxValue: Double read FMaxValue write SetMaxValue;
     property Value: Double read GetValue write SetValue;
     property ValueEmpty: Boolean read FValueEmpty write SetValueEmpty default False;
+  published
+    // inherited
+    property Alignment;
   end;
   
   { TFloatSpinEdit }
spin.pp.patch (461 bytes)

Zeljan Rikalo

2013-06-22 10:43

developer   ~0068427

This won't work with all widgetsets "out of the box", so it must be implemented but I guess that win32 and qt won't have problems.

Bart Broersma

2013-06-22 17:48

developer   ~0068438

Please close if OK.

Bart Broersma

2013-06-22 17:49

developer   ~0068439

Last edited: 2013-06-22 17:50

View 2 revisions

@Zeljan. Tested win32 and gtk2.

wp

2013-06-22 18:14

developer   ~0068440

Thanks.

Vojtech Cihak

2013-06-22 23:20

reporter   ~0068445

I tested with Lazarus 1.1 r41807M FPC 2.7.1 x86_64-linux-qt and it does NOT work (TSpinEdit nor TFloatSpinEdit). I tried the widget in Qt Designer and it is capable to do it.

Bart Broersma

2013-06-23 11:21

developer   ~0068451

@Vojtech: please open a new bugreport.
This one was about publishing the property.

Issue History

Date Modified Username Field Change
2013-06-21 20:17 wp New Issue
2013-06-21 20:17 wp File Added: spin.pp.patch
2013-06-22 09:51 Bart Broersma Assigned To => Bart Broersma
2013-06-22 09:51 Bart Broersma Status new => assigned
2013-06-22 10:43 Zeljan Rikalo Note Added: 0068427
2013-06-22 17:48 Bart Broersma Fixed in Revision => r41805
2013-06-22 17:48 Bart Broersma LazTarget => -
2013-06-22 17:48 Bart Broersma Note Added: 0068438
2013-06-22 17:48 Bart Broersma Status assigned => resolved
2013-06-22 17:48 Bart Broersma Fixed in Version => 1.1 (SVN)
2013-06-22 17:48 Bart Broersma Resolution open => fixed
2013-06-22 17:49 Bart Broersma Note Added: 0068439
2013-06-22 17:50 Bart Broersma Note Edited: 0068439 View Revisions
2013-06-22 18:14 wp Note Added: 0068440
2013-06-22 23:20 Vojtech Cihak Note Added: 0068445
2013-06-23 11:21 Bart Broersma Note Added: 0068451
2014-01-18 15:08 wp Status resolved => closed