View Issue Details

IDProjectCategoryView StatusLast Update
0023875LazarusLCLpublic2013-02-22 15:03
ReporterBart BroersmaAssigned ToBart Broersma 
Status closedResolutionfixed 
Platformi386OSWindowOS VersionWin7
Product Version1.1 (SVN)Product Buildr40253 
Target Version1.2.0Fixed in Version1.1 (SVN) 
Summary0023875: TValueListEditor: Cell doesn't get updated when Strings is changed under certain conditions
DescriptionIf you have a TValueListEditor and have goAlwaysShowEditor in Options, then when (by code) you channge an item of the Strings property, _and_ the item you change is on the current row, then the cell contents of [current col,current row] does not get updated, and will be lost.
Steps To ReproducePut a TValueListEditor on a form.
Include goAlwaysShowEditor in Options
Assign items to it's Strings property like e.g.

In a buttons onclick do
ValueListEditor1.Strings[0] := 'Five=5';

Build, run, click the button.

Expected result
The first row should read: |Five|5| (| being the column separator)
Observed result
First row reads: |Five|1|

(I'll attach a sample program, when I'm back home again)
Additional InformationThis problem also occurred with Strings.Assign, Strings.SetText, Strings.Insert etc.
There I have fixed it by temporarily disabling the goAlwaysShowEditor in overridden InsertItem, Clear and Delete.

That approach however won't work with Strings.Put, because when you type in the grid, the Editor's TextChanged will update the cell, which in turn in TValueListEditor will eventually update the Strings associated with that cell, and Strings.Put is called.
If you disable goAlwaysShowEditor in Strings.Put, the Editor is hidden and then shown again, with the text selected. In effect it behaves as if you can only type 1 character in the control.
TagsNo tags attached.
Fixed in Revisionr40282
Attached Files


Bart Broersma

2013-02-12 22:42

developer (3,815 bytes)

Bart Broersma

2013-02-12 22:44

developer   ~0065647

Sample project added.
Build, run, click "Assign", click "Put"
First Row = |One|Put|
Should be |PutBtn (0)|Put|

Issue History

Date Modified Username Field Change
2013-02-11 12:19 Bart Broersma New Issue
2013-02-12 22:42 Bart Broersma File Added:
2013-02-12 22:44 Bart Broersma Note Added: 0065647
2013-02-12 23:17 Bart Broersma Fixed in Revision => r40282
2013-02-12 23:17 Bart Broersma Status new => resolved
2013-02-12 23:17 Bart Broersma Fixed in Version => 1.1 (SVN)
2013-02-12 23:17 Bart Broersma Resolution open => fixed
2013-02-12 23:17 Bart Broersma Assigned To => Bart Broersma
2013-02-22 15:03 Bart Broersma Status resolved => closed