12.07.2015 Views

TMS Pack for FireMonkey Developers Guide - TMS Software

TMS Pack for FireMonkey Developers Guide - TMS Software

TMS Pack for FireMonkey Developers Guide - TMS Software

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>TMS</strong> SOFTWARE<strong>TMS</strong> <strong>Pack</strong> <strong>for</strong> <strong>FireMonkey</strong>DEVELOPERS GUIDE<strong>TMS</strong>FMXTableView1.BeginUpdate;<strong>for</strong> I := 0 to 100 dobeginit := <strong>TMS</strong>FMXTableView1.Items.Add;it.Caption := 'Item ' + inttostr(I);it.Description := 'Hello World !';end;<strong>TMS</strong>FMXTableView1.EndUpdate;Note that all calls to the <strong>TMS</strong>FMXTableView must include a BeginUpdate and EndUpdate statement.Whenever an item is added, the display list is rebuilt. With a BeginUpdate and EndUpdate statementthe update process is blocked and then executed once.To remove an item programmatically, just call the item’s destructor.SortingAfter adding items, sorting can be applied to the collection. This will be done alphabetically bydefault, but can be customized with the OnItemCompare event.If no sorting is applied, the items are displayed in the order that they are added in the collection.varit: T<strong>TMS</strong>FMXTableViewItem;i: Integer;begin<strong>TMS</strong>FMXTableView1.BeginUpdate;it := <strong>TMS</strong>FMXTableView1.Items.Add;it.Caption := 'Pear';it.Description := 'This is a Pear';it := <strong>TMS</strong>FMXTableView1.Items.Add;it.Caption := 'Banana';it.Description := 'This is a Banana';it := <strong>TMS</strong>FMXTableView1.Items.Add;it.Caption := 'Apple';it.Description := 'This is an Apple';it := <strong>TMS</strong>FMXTableView1.Items.Add;it.Caption := 'Lemon';it.Description := 'This is a Lemon';<strong>TMS</strong>FMXTableView1.EndUpdate;end;32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!