Difference between revisions of "TIpHtmlPanel"
From Lazarus wiki
Jump to navigationJump to searchLine 12: | Line 12: | ||
fs := TStringStream.Create( txt ); | fs := TStringStream.Create( txt ); | ||
try | try | ||
− | pHTML:=TIpHtml.Create; | + | pHTML:=TIpHtml.Create(); |
− | pHTML.LoadFromStream(fs); | + | pHTML.LoadFromStream( fs ); |
finally | finally | ||
fs.Free; | fs.Free; |
Revision as of 11:00, 26 August 2016
The TIpHtmlPanel component is the display part of the Turbopower Internet Pro package that delivers native HTML-access. The component is available from the IPro tab of the Component Palette.
A TIpHtmlPanel gets its contents from a TIpHTML descendant:
procedure TMainForm.ShowText( const txt: string );
var
fs: TStringStream;
pHTML: TIpHtml;
begin
try
fs := TStringStream.Create( txt );
try
pHTML:=TIpHtml.Create();
pHTML.LoadFromStream( fs );
finally
fs.Free;
end;
IpHtmlPanel1.SetHtml( pHTML );
except
on E: Exception do begin
MessageDlg( 'Error: '+E.Message, mtError, [mbCancel], 0 );
end;
end;
end;
See also