Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • 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,112
    • Issues 2,112
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • LazarusLazarus
  • LazarusLazarus
  • Issues
  • #34044
Closed
Open
Issue created Jul 28, 2018 by FPC Admin account@fpc_adminOwner

list view column width 0 in oncreate after handle creation

Original Reporter info from Mantis: BeniBela @benibela
  • Reporter name: Benito van der Zander

Description:

Here the column width is always 0 regardless of the designer settings:

procedure TForm1.FormCreate(Sender: TObject);
var
  i, sum: Integer;
begin
  Canvas.GetTextHeight('Hm,.|');;
  sum := 0;
  for i := 0 to ListView1.ColumnCount - 1 do
    sum := sum + ListView1.Column[i].Width;
  caption := IntToStr(sum);
end;

Additional information:

in my actual project it is even worse: reading width, sets width to 0, but it does not happen anywhere else

Mantis conversion info:

  • Mantis ID: 34044
  • Build: Lazarus 1.8.1 r55664M FPC 3.1.1
  • Fixed in revision: r59047 (#5102a773)
Assignee
Assign to
Time tracking