Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed column MinWidthPercent leads to inifinite loop #1236

Open
obones opened this issue Jan 19, 2024 · 0 comments
Open

Fixed column MinWidthPercent leads to inifinite loop #1236

obones opened this issue Jan 19, 2024 · 0 comments

Comments

@obones
Copy link
Contributor

obones commented Jan 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant