Having Problems With Correctly Populating TsListView

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #35809
    DarrenB
    Participant

    Hi Serge 🙂

    I want to have a single column TsListView (ViewStyle VsIcon) whose contents I control dynamically within the program. I looked through the demo code to try and figure out how best to do this but I can't seem to get it right.

    To try and get it working I tested a standard ListView with the code

    Code:
    procedure TForm1.sButton1Click(Sender: TObject);
    var
    i, l: integer;
    TestItem: TListItem;
    begin
    ListView1.items.BeginUpdate;

    for i := 0 to 5 do
    begin
    TestItem := ListView1.items.Add;
    TestItem.Caption := 'LONGNAMETESTING' + inttostr(i);
    TestItem.ImageIndex := random(5);
    end;

    ListView1.items.EndUpdate;
    end;

    and then an AC TsListView with basically the same code

    Code:
    procedure TForm1.sButton2Click(Sender: TObject);
    var
    i, l: integer;
    TestItem: TListItem;
    begin
    sListView2.SkinData.BeginUpdate; // Disable an updating of skinned scrolls
    sListView2.items.BeginUpdate;

    for i := 0 to 5 do
    begin
    TestItem := sListView2.items.Add;
    TestItem.Caption := 'LONGNAMETESTING' + inttostr(i);
    TestItem.ImageIndex := random(5);
    end;

    sListView2.SkinData.EndUpdate; // Disable an updating of skinned scrolls
    sListView2.items.EndUpdate;

    end;

    The 'standard' code correctly adds items to the delphi ListView… however my attempt at doing the same in AC only resulted in the items being added, but all with the caption '…'

    Hovering the mouse over the AC Tslistview shows the correct caption… but it isn't displayed correctly there either… it looks like the caption is being cropped? To see what I mean, add items to the TsListView using the button in the demo, then hover the mouse over the added items.

    I have attached a demo to try and show what I mean. Hope you can help 🙂

    Windows Vista 64Bit, Delphi XE, AC 8.44

    Best Wishes

    Darren

    #50743
    Support
    Keymaster

    Hello Darren! Thank you for the demo!

    I'll try to fix it in the nearest release.

    #50745
    DarrenB
    Participant
    'Support' wrote:

    Hello Darren! Thank you for the demo!

    I'll try to fix it in the nearest release.

    Thanks, Serge 🙂

    #50818
    DarrenB
    Participant

    Confirmed as fixed in AC 8.45

    Thanks Serge 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.