Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>
TMS IntraWeb iPhone controls pack
How to populate the TIWIPhoneList asynchronously
How to populate the TIWIPhoneList asynchronously
You can use an asynchronous event (for example, the OnAsyncLeftButtonClick of the TIWIPhoneHeader component) to populate the TIWIPhoneList. It is also required to add a call to TIWIPhoneList1.AsyncItemsAdd after adding items asynchronously.
Example:
procedure TIWForm1.TIWIPhoneHeader1AsyncLeftButtonClick(Sender: TObject; EventParams: TStringList); var I: integer; begin for I := 0 to 50 - 1 do begin Inc(UserSession.pContaLin); with TIWIPhoneList1.Items.Add() do begin Caption := ''List Item '' + IntToStr(UserSession.pContaLin); Value := IntToStr(UserSession.pContaLin); Notes := ''notes: '' + IntToStr(UserSession.pContaLin); end; end; TIWIPhoneList1.AsyncItemsAdd; end;