- Copy the Do not block main thread! recipe into a new folder.
- Open the project and save it as WeatherForecastsEx.dproj.
- Change the code, as shown in the following steps.
- In the private section of the form declaration, add the following methods:
private Lang: string; procedure AddFooter(AItems: TAppearanceListViewItems; const LMinInTheDay, LMaxInTheDay: Double); procedure AddHeader(AItems: TAppearanceListViewItems; const ADay: String); procedure AddForecastItem(AItems: TAppearanceListViewItems; const AForecastDateTime: TDateTime; const AWeatherDescription: String; const ATempMin, ATempMax: Double);
- Press Ctrl + Shift + C to create the method bodies, and then add the following code:
procedure TMainForm.AddHeader(AItems: ...