Skip to content

Fixed column MinWidthPercent leads to inifinite loop #1236

Open
@obones

Description

@obones

During discussion of Issue #998, it was discovered that using FixedAreaConstraints.MinWidthPercent on a tree without columns would lead to an infinite loop inside TVTHeader.ResizeColumns

While this is fixed in the current source, the same infinite loop arises if the tree has one more columns but none having coFixed in its options.
In this case, RangeEndCol is greater than 0 but MaxDelta stays at 0 because column options are not matched to the passed in expected values.

Yes, I agree that it's a bit "stupid" to have set FixedAreaConstraints.MinWidthPercent when non columns are fixed, but this should not lead to an infinite loop as changing the column options may happen during the life of the application, not necessarily at design time.

Here is a sample application showing the issue:

VTVHeaderMinWidthPercent.zip

Beware! Opening the main form unit will deadlock your IDE if you have installed the design package, as it will try to run the affected code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions