Delphi Insert Table HTML code

Source: Internet
Author: User



<table width= "174" height= "" "border=" 1 "align=" center "cellpadding=" 1 "cellspacing=" 1 "bordercolor=" #000000 " Bgcolor= "#FFFFFF" summary= "Text" >
Properties of Table
Width
Height
Border
Align
cellpadding Fill
cellspacing Spacing
BorderColor
BgColor
Summary Summary



of events


The method 

Number of table rows/table columns

procedureInserthtml (Consthtml:widestring);
begin
(Form1.WebBrowser1.Document as IHTMLDocument2). Selection.createrange as IHTMLTxtRange). pastehtml (' <p><b > ' +html+ ' </B></P> ');
End;

//------------------------------------------------------------------------------
Mesh effects are now available with pastehtml
procedureInserttable (ConstCol:integer = 2;ConstRow:integer = 2);
var
Colcnt, Rowcnt:integer;
STable:string;
begin
Stable is the HTML code for the table
STable: = ' <table border=1 width= ' 100% ' style= ' border-collapse:collapse;border-color:black ' > ';
STable: = ' <table border=1 width= ' 100% ' > ';//No style

forROWCNT: = 1 toRow Do
begin
STable: = sTable + ' <TR> ';
forCOLCNT: = 1 toCol Do
STable: = sTable + ' <TD> </TD> ';
STable: = sTable + ' </TR> ';
End;
STable: = sTable + ' </TABLE> ';

Inserting HTML Tables
Inserthtml (sTable);
End;




From for notes (Wiz)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.