Menu

#248 TableView - CustomViewFrame

closed
None
Bug
2014-04-07
2014-04-06
Fenistil
No

Hi!

I've donwloaded the latest SVN code base, and the TableViewCustomViewFrame DEMO doesn't work as expected. I see 100 rows in the Table and their height is ok too (80px) but all of them are empty. There is no image or any visible label.

On the other hand, if I try to use two or more types of frames in one TableView, strange things happen. For example, add 10 items (type Frame1) then add 10 rows of Frame2. Now the first 10 items will be Frame1 as expected, but after that, some rows are still Frame1, but it should be Frame2. Check out the attached source. (There is a screenshot in the ZIP too.) Sometimes this bug hang or crash the app.

Thanks

1 Attachments

Discussion

  • Babak Yaghoobi

    Babak Yaghoobi - 2014-04-06

    Hi Fenistil

    Each frame must be have a unique Identifier, add this event in your code:

    procedure TForm1.TableView1NeedCellIdentifier( Sender: TObject; Section, RowNo: Integer; var CellIdentifier: string );
    begin
      if RowNo < 10 then
        CellIdentifier := 'DPF.Frame40'
      else
        CellIdentifier := 'DPF.Frame80';
    end;
    

    Regards

     

    Last edit: Babak Yaghoobi 2014-04-06
  • Fenistil

    Fenistil - 2014-04-06

    Thanks Babak! It works perfectly, sorry for this "bug".

     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-04-07
    • status: open --> closed
     
  • Babak Yaghoobi

    Babak Yaghoobi - 2014-04-07

    Hi Fenistil

    No problem, my friend.

    Regards

     

Log in to post a comment.