line breaks in text?

Oct 3, 2015 at 3:33 AM
Hi,

I've got text which has line breaks.

Superlist seems to parse out the line breaks and display the text all in one line.

I've had a look through the code but can't seem to track down where it is happening. I'll keep looking but maybe someone can save me some time.

Awesome control by the way. Fairly simple but powerful.

Thanks,
Angus.
Oct 4, 2015 at 11:22 AM
Well, found the problem after a bit of code digging. Finally got to sneak coding time from family time. :-)

Column.cs (line# 579): Seems like the default vertical alignment of a new column is VerticalAlignment.Center.

GdiPlus.DrawString function (line# 136): there is a case statement "switch (valignment)" which adds the "User.DrawTextFlags.DT_SINGLE_LINE" value when valignment is Center. This DT_SINGLE_LINE obviously parses out line breaks.

Column.cs (line# 579): I have changed the declaration of _verticalAlignment to be VerticalAlignment.Top to avoid having to declare this property in all my columns to make line breaks appear correctly.

I've no idea whether this project is still active or if my code change should be merged back into CodePlex. But there is a solution if anyone comes across the same problem.

Still chasing down a bug where columns are not auto-sized when SizeColumnsToFit is called. It seems that the resizing code is called before objects are finally loaded into grid. The columns that are "auto-sized" are just the column headers and not cell content in the rows.

Thanks,
Angus.