Forum Replies Created
-
AuthorPosts
-
Thanks Ray. That fixed in the example I sent where the ViewStyle is changed, but this problem is also manifesting in other ways, and that didn’t fix those.
In my code where this bug is manifesting, I don’t actually change the ViewStyle, but I do change the default position of the form. In my initial example at the top of this thread, I programmatically set the form position to poMainFormCenter for the modal form (Form2) and then the column headers disappear …and this seems to function for me now (in Delphi 12.2).
In the places where I am still seeing this issue, the TRzListView components are part of a TFrame. Maybe that’s the difference? I’m not sure as I haven’t tried to dig deeper into the issue once I found a “fix.”
The WMNCPaint procedure may be a bigger hammer than is needed, but it seems to work in all cases. I did (just now) add a check for “if ViewStyle = vsReport” though.
For anyone following this, I found the following work-around / hack. I’m sure that an actual fix could be created using this info, but this is what I have at the moment, and it works.
In RzListVw.pas (you’ll obviously need to compile using the modified file) inside the WMNCPaint procedure, add “ResetHeaderHandle;” just before the end of the routine.
e.g.
procedure TRzCustomListView.WMNCPaint( var Msg: TWMNCPaint );
var
DC: HDC;
begin
inherited;
.
. —- procedure code omitted here —-
.
ResetHeaderHandle;
end;I reported this issue to Embarcadero Quality Portal. Hopefully this link works for everyone:
https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-1735
Just making sure you haven’t forgotten about us. 😉
I will. I have found a handful of ways to duplicate the issue and also discovered that it’s NOT happening in 11.3 (I was mistaken) and it’s also not specifically related to the FillLastColumn property.
…and after spending more time on this tonight, that workaround doesn’t work in all cases. 🙁
I should mention that the RzListView1.ViewStyle should be set to vsReport, otherwise no columns display (by design). But hopefully that was obvious.
Also, I just did a bit more poking around and discovered that it FillLastColumn is False, then it displays the columns. This appears to be a very old bug resurfacing. A work-around therefore appears to be setting FillLastColumn to False at design-time, then setting it to True at run-time. Not the greatest solution, but I can work with it for now.
-
AuthorPosts