If you reset the column width in the LIST group, the result is:
If ?List{PropList:GroupNo + PropList:Group,Index#} > 0 ! Column in Group
?List{PropList:Width,Index#} = 0
Message(?List{PropList:Width,Index#}) ! = -1
end
Thanks ! It’s a great idea. But if you look at the example, the practice is much worse.
If the column is without a group, the code works normally:
If ?List{PropList:GroupNo + PropList:Group,Index#} = 0 ! Column without Group
?List{PropList:Width,Index#} = 0
Message(?List{PropList:Width,Index#}) ! = 0 OK !
end
There is a list with five columns in the group:
Let’s make the four columns have zero width (hide the columns). The result is not very good:
The reason is the negative width of the hidden column.
Maybe there is another way to hide a column in the LIST ? Thanks !
Column flags can be any. This is an RTL C11.1 problem, there is no such problem when building in C63.
There are many similar problems “Clarion by subscription”, but I have not yet found a solution for this one.
The incorrect behavior really exists but there are nuances. The behavior is dependent from the font and, probably, from other window/list properties - I didn’t run the test under debugger. That’s why I asked for a real example.
Thank you. This is a lucky exception. I have your example in Win10 that looks like this (I added the font size). When building with RTL C63, there is no problem with any font. This is the C11 issue
The change in the LIST implementation which is a root of the problem has been made for C7. For some reasons, the LIST code reserves the space at the right of grouped columns even if the | modifier is not present. If the program changes some LIST/column property affecting data set from the format string, the RTL rebuilds the format string and applies it to LIST. The original reason of the problem is that the extra space should not be reserved if column width is 0. The secondary one is that the code could check width that the column’s width is 0 and not deduct the extra space on rebuilding the part of the format string corresponding to particular column,
There is no a good work around for this issue, The only one is to handle the format string and set it using PROP:Format rather than use property assignments to change every single property.
There’s a simple algorithm, I recalculate the width of the group when hiding the columns.
Now the LIST is working with problems, I will try to remove the column shift through the offset…
Thanks for the discussion.
I completely solved this problem by adding an offset to the column header and content.
But here, of course, there should be a “hidden” flag for the column, and not a “-1” width…
Thanks again to everyone for checking the problem and finding a solution.