Create table
Create table
Hello Sergey.
Do you have any demo or some sample table creation and insertion of records in SRichViewEdit?
Do you have any demo or some sample table creation and insertion of records in SRichViewEdit?
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Do you want to insert a new table with bold text in the first cell (or in the first row), and not bold in others?
Bold/not-bold is a property of text style, not table cell.
Each cell initially has one empty text string of the 0-th text style.
You can change it:
Do you need an example how to insert a table where all cells have the current text style (but not bold) except for cells in the first tow, which have the current text style, but bold?
Bold/not-bold is a property of text style, not table cell.
Each cell initially has one empty text string of the 0-th text style.
You can change it:
Code: Select all
table.Cells[0,0].Clear;
table.Cells[0,0].AddNL('', bold style index, 0);
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Hello Sergey.
I'm not able to get the records (data) within the table (TTable) become centralized.
I use this command:
table: TRVTableItemInfo.CreateEx = (1.12 + QueryObi.RecordCount, SRichViewEdit1.RichViewEdit.RVData);
table.Color: = clNone;
table.BorderStyle: = rvtbColor;
table.CellBorderStyle: = rvtbColor;
table.BorderWidth: = 1;
table.BorderVSpacing: = 0;
table.BorderHSpacing: = 0;
table.CellBorderWidth: = 1;
table.CellPadding: = 0;
table.CellVSpacing: = 0;
table.CellHSpacing: = 0;
table.VRuleWidth: = 1;
table.HRuleWidth: = 1;
aux: = 'No. of Order';
size: = 70;
is r: = 0 to table.Rows.Count-1
is c: = 0 to table.Rows [r]. Count-1 do begin
if (r> 0) and (c = 0) then
begin
aux: = FormatFloat ('0000000 ', StrToInt (QueryObiTermo.AsString));
size: = 70;
end;
table.Cells [r, c]. BestWidth: = size;
table.Cells [r, c]. Clear;
if r = 0 then Style: = 22
else Style: = 23;
table.Cells [r, c]. AddFmt (aux, [], style, 0);
table.Cells [r, c]. Color: = clWhite;
SRichViewEdit1.RichViewEdit.InsertItem if ('', table) then
begin
end;
What command I use to centralize data into the table?
I'm not able to get the records (data) within the table (TTable) become centralized.
I use this command:
table: TRVTableItemInfo.CreateEx = (1.12 + QueryObi.RecordCount, SRichViewEdit1.RichViewEdit.RVData);
table.Color: = clNone;
table.BorderStyle: = rvtbColor;
table.CellBorderStyle: = rvtbColor;
table.BorderWidth: = 1;
table.BorderVSpacing: = 0;
table.BorderHSpacing: = 0;
table.CellBorderWidth: = 1;
table.CellPadding: = 0;
table.CellVSpacing: = 0;
table.CellHSpacing: = 0;
table.VRuleWidth: = 1;
table.HRuleWidth: = 1;
aux: = 'No. of Order';
size: = 70;
is r: = 0 to table.Rows.Count-1
is c: = 0 to table.Rows [r]. Count-1 do begin
if (r> 0) and (c = 0) then
begin
aux: = FormatFloat ('0000000 ', StrToInt (QueryObiTermo.AsString));
size: = 70;
end;
table.Cells [r, c]. BestWidth: = size;
table.Cells [r, c]. Clear;
if r = 0 then Style: = 22
else Style: = 23;
table.Cells [r, c]. AddFmt (aux, [], style, 0);
table.Cells [r, c]. Color: = clWhite;
SRichViewEdit1.RichViewEdit.InsertItem if ('', table) then
begin
end;
What command I use to centralize data into the table?
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: