Table 1px border problem with MergeCells

General TRichView support forum. Please post your questions here
Post Reply
execoma
Posts: 14
Joined: Thu Sep 09, 2010 4:31 pm

Table 1px border problem with MergeCells

Post by execoma »

Hello!

IF:

Code: Select all

TRVTableItemInfo* __fastcall CreateTable(int Rows,int Cols,TCustomRVData *RVData)
{
	TRVTableItemInfo *Table = new TRVTableItemInfo(Rows,Cols,RVData);

	Table->BorderStyle = rvtbColor;
	Table->CellBorderStyle = rvtbColor;
	Table->Color = Graphics::clNone;
	Table->BorderColor = clBlack;
	Table->CellBorderColor = Graphics::clNone;

	Table->BorderWidth = 1;
	Table->CellBorderWidth = 1;
	Table->VRuleWidth = 1;
	Table->HRuleWidth = 1;
	Table->CellPadding= 2;

	Table->CellVSpacing = -1;
	Table->CellHSpacing = -1;
	Table->BorderVSpacing = -1;
	Table->BorderHSpacing = -1;

	return Table;
}
+ MergeCells()

Result:
http://s3.hostingkartinok.com/uploads/i ... 00f501.png

If TSRichViewEdit->RichViewEdit->SaveRTF() - no problem.
If srvActionPrint1 - problem.

Please help me.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If you use old version of ScaleRichView, please upgrade to new version.

Also, try including rvtoCellBelowBorders in table->Options.
execoma
Posts: 14
Joined: Thu Sep 09, 2010 4:31 pm

Post by execoma »

Sergey Tkachenko wrote:If you use old version of ScaleRichView, please upgrade to new version.

Also, try including rvtoCellBelowBorders in table->Options.
Version:
RVE 13.10. RVA 3.4. SRV 4.6

IF

Code: Select all

Table->Options = Table->Options << rvtoCellBelowBorders;
Cell borders become invisible.

I install new version:
RVE 14.12.6. RVA 4.5.7. SRV 5.9.6

Another similar effect:
http://s4.hostingkartinok.com/uploads/i ... f8bcbb.png

rvtoCellBelowBorders also makes the cell borders invisible.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please send a sample RVF file to richviewgmailcom
execoma
Posts: 14
Joined: Thu Sep 09, 2010 4:31 pm

Post by execoma »

execoma
Posts: 14
Joined: Thu Sep 09, 2010 4:31 pm

Post by execoma »

I'm doing everything right?
Maybe move this topic in "Private Support Forums"? (accidentally created here)
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry for the delay.

- Rules are deprecated feature of tables. Please do not use them, use cell borders instead.
- Please do not use clNone to hide borders, assign BorderWidth/CellBorderWidth=0 instead.
execoma
Posts: 14
Joined: Thu Sep 09, 2010 4:31 pm

Post by execoma »

Sergey Tkachenko wrote:Sorry for the delay.

- Rules are deprecated feature of tables. Please do not use them, use cell borders instead.
- Please do not use clNone to hide borders, assign BorderWidth/CellBorderWidth=0 instead.
If remove Rules and clNone code lines result:
http://s7.hostingkartinok.com/uploads/i ... 8e7ebe.png

Can you give an example of code? Please
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Also assign

Code: Select all

Table->BorderVSpacing = 0; 
Table->BorderHSpacing = 0; 
execoma
Posts: 14
Joined: Thu Sep 09, 2010 4:31 pm

Post by execoma »

Bad:

1. Stamens in the corner
2. Border 2px. I need 1px.

Image

Code:

Code: Select all

TRVTableItemInfo* __fastcall TForm1::CreateTable(int Rows,int Cols,TCustomRVData *RVData)
{
	TRVTableItemInfo *Table = new TRVTableItemInfo(Rows,Cols,RVData);

	Table->BorderStyle      = rvtbColor;
	Table->CellBorderStyle  = rvtbColor;
	Table->BorderColor      = clBlack;
	Table->BorderWidth      = 1;
	Table->CellBorderWidth  = 1;
	Table->CellPadding      = 2;
	Table->CellVSpacing     = -1;
	Table->CellHSpacing     = -1;
	Table->BorderVSpacing   = 0;
	Table->BorderHSpacing   = 0;

	return Table;
}
//---------------------------------------------------------------------------
Can you give full example code? Please
execoma
Posts: 14
Joined: Thu Sep 09, 2010 4:31 pm

Post by execoma »

And:

Image
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This code creates a table with 1px lines between cells - if you set 100% zoom.
Line ends are also artifacts of zooming. We will fix it in future updates.
execoma
Posts: 14
Joined: Thu Sep 09, 2010 4:31 pm

Post by execoma »

It is not only artifacts of zooming:

1. If I print (TsrvActionPrint):
https://www.dropbox.com/s/yn76ni4g0v87i ... %D0%B0.png

2. And I need table border 1px !!!
If set BorderWidth = 0 this is terrible:
https://www.dropbox.com/s/zefe9rqy75gnw ... B0%202.png

-----
Russian: Я не владею английским. Может быть плохо излагаю суть проблемы. Отчеты, которые готовятся в TSRichViewEdit служат для распечатки на принтере. Отчеты состоят из множества таблиц с кучей MergeCells. И эти "артефакты" серьезно портят внешний вид документа. Если бы отчеты не распечатывались, а наблюдались бы с экрана при zoom 100%, то на это можно было бы закрыть глаза, а так не получается. Очень странно, что у столь навороченных компонентов со столь долгой историей такие странные проблемы, как создание самой простой стандартной однопиксельной таблицы. Поэтому у меня ощущение, что я просто чего-то не понимаю или плохо излагаю мысли, т.к. иначе есть ощущение некого когнитивного диссонанса.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Answered in a private message.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

The line-ends problem in zoomed view is fixed in TRichView 14.15.1 (available for registered users)
Post Reply