Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/VCL/Win 32 Controls/TListView    [ Add a report in this area ]  
Report #:  6145   Status: Reported
Long list view items caption prevents the form to maximize!
Project:  Delphi Build #:  4.453
Version:    7.0 Submitted By:   Gabriel Corneanu
Report Type:  Minor failure / Design problem Date Reported:  10/8/2003 7:42:21 AM
Severity:    Infrequently encountered problem Last Updated: 10/8/2003 8:19:33 AM
Platform:    All versions Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (2 Total Ratings)
5.00 out of 5
Total Votes: 1
Description
This is a strange one:
If you populate on create of a form the items of a list view (in report mode) AND at least one item is larger than the list, the form is not properly maximized!
This is happening on 2000 and 98 but not on XP!
Steps to Reproduce:
1. Create empty default project
2. Drop a list view
3. write this in OnCreate. I set all necessary properties in runtime to make it easy to reproduce:

procedure TForm1.FormCreate(Sender: TObject);
begin
  with ListView1 do
  begin
    Parent := Self;
    Left := 0;
    Top := 0;
    Width := 145;
    Align := alLeft;
    with Columns.Add do begin
      Caption := 'Column';
      Width := 250;
    end;
    ViewStyle := vsReport;
    Items.Add.Caption := 'asdf asdf asdf asdf asdf asf asdf asdf asdf asf asdf';
  end;
  WindowState := wsMaximized;
end;

4. Run

To verify, make the item caption smaller so it fits into the column.
Again, it only happens on Win2000 and 98, not on XP.
Workarounds
None
Attachment
None
Comments

Mathias Harbeck at 5/15/2005 10:04:31 AM -
I could reproduce a similar behaviour on Windows XP (SP2) with C++ Builder 5.0 Professional (Update 1).

But in my case it seems to be "only" a problem with the column header - if i set it to a smaller width, everything works fine (while shortening the item's text does not help).

Mathias Harbeck at 5/15/2005 12:37:19 PM -
An addition: if the overall height of all items is greater than the height of the listview, the same problem seems to apply.

Server Response from: ETNACODE01