Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-12

Range-check error in TCarbonListColumn.SetHeaderWidth

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joost van der Sluis

Hi all,

Each time I start Lazarus on OS/X-Carbon, I get a range-check error.

This because TCarbonDataBrowser.AutoSizeColumns calculates a negative width. It calculates ((cRect.right-cRect.left)-sWidth) div aCnt. I think that sWidth is the sum of the width of all columns which are not auto-sized, and aCnt is the number of columns that are autosized. The problem arises if the sWidth is larger then the width of the rect.

I can think of several ways to fix this. But what is .AutoSizeColumns supposed to do in this case?

Regards,

Joost

Reply by email