TRzListView Columns (missing headers)

Home Forums Konopka Signature VCL Controls (formerly Raize Components) TRzListView Columns (missing headers)

Viewing 6 reply threads
  • Author
    Posts
    • #3847
      Jeremy Praay
      Participant

        Create a Delphi Project with 2 forms (Form1, Form2).
        Set Visible to False on Form2.

        Project1.dpr should look like this:

        program Project1;

        uses
        Vcl.Forms,
        Vcl.Themes,
        Vcl.Styles,
        Unit1 in ‘Unit1.pas’ {Form1},
        Unit2 in ‘Unit2.pas’ {Form2};

        {$R *.res}

        begin
        Application.Initialize;
        Application.MainFormOnTaskbar := True;
        Application.CreateForm(TForm1, Form1);
        Application.CreateForm(TForm2, Form2);
        Application.Run;
        end.

        Put a TRzListView on Form2 and create column headers in it.
        Assign on OnClick event to Form1 with the following

        procedure TForm1.FormClick(Sender: TObject);
        begin
        Form2.Position := poMainFormCenter;
        Form2.ShowModal;
        end;

        Run the code, click the form, Form2 will not display the column headers.  This seems to be related to assigning the Form2.Position.  It also occurs if I change the FormStyle to fsStayOnTop, and perhaps some other things as well.  If that single line is removed, it will display correctly.  Also, the TListView component doesn’t appear to have this problem.

        Oddly, if I don’t use the “Windows” default for the Application Style, it seems to display correctly.  Also, this was fine until I installed Delphi 12 around mid November.  But now even if I compile in Delphi 11.3, the same problem appears.  I’m guessing that I upgraded both Delphi 11 and 12 to the latest version (7.0.0).

        Hopefully you can duplicate this issue.  It is currently holding up our application from being deployed.

        Thanks for your help!

      • #3848
        Jeremy Praay
        Participant

          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.

        • #3849
          Jeremy Praay
          Participant

            …and after spending more time on this tonight, that workaround doesn’t work in all cases. 🙁

          • #3854
            Ray Konopka
            Keymaster

              Hi Jeremy,
              Unfortunately, I’ve been unable to duplicate the problem. Would you be able to send the source code to a sample project (no exes) to support@raize.com that demonstrates the issue?
              Ray

            • #3855
              Jeremy Praay
              Participant

                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.

              • #3856
                Nick Klein
                Participant

                  It happens to me every time.  I am using Delphi 12 Patch 1 and KSVC 7.0.

                  Steps to reproduce:

                  1. Create a new VCL app.

                  2. Add a TRzSplitter to the form. I left all the properties as the defaults.

                  3. Add a RzListView into one of the splitter panes. I left all the properties as the defaults except for ViewStyle.

                  4. Set the RzListView ViewStyle as vsReport and define a couple of columns with text.

                  5. Run the program.  The column text appears in the designer, but not while running the program.

                  6. If the RzListView FillLastColumn property is set to False, the column heading text does appear when the program runs.  Note: I had to change it in the designer. Changing it at runtime had no effect.

                  Hope this helps.

                • #3858
                  Ray Konopka
                  Keymaster

                    For those following this thread. Jeremy did send me a sample project and I am able to duplicate the issue. I am working on a fix.

                    Ray

                Viewing 6 reply threads
                • You must be logged in to reply to this topic.