Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,083
    • Issues 2,083
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

GitLab 15.0 is launching on May 22! This version brings many exciting improvements, but also removes deprecated features and introduces breaking changes that may impact your workflow. To see what is being deprecated and removed, please visit Breaking changes in 15.0 and Deprecations.

  • FPC
  • Lazarus
  • LazarusLazarus
  • Issues
  • #23875
Closed
Open
Created Feb 11, 2013 by FPC Admin account@fpc_adminOwner

TValueListEditor: Cell doesn't get updated when Strings is changed under certain conditions

Original Reporter info from Mantis: Bart @flyingsheep
  • Reporter name: Bart Broersma

Description:

If 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 reproduce:

Put a TValueListEditor on a form.
Include goAlwaysShowEditor in Options
Assign items to it's Strings property like e.g.
One=1
Two=2
Three=3

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 information:

This 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.

Mantis conversion info:

  • Mantis ID: 23875
  • OS: Window
  • OS Build: Win7
  • Build: r40253
  • Platform: i386
  • Version: 1.1 (SVN)
  • Fixed in version: 1.1 (SVN)
  • Fixed in revision: r40282 (#e233a671)
  • Target version: 1.2.0
Assignee
Assign to
Time tracking