trichview.com

trichview.support




Re: Table / Cell size by mm / inches?


Return to index


Author

Message

Tobias Thörn

Posted: 11/28/2003 16:50:34


I asume you want to print the RVEdit, or? Else I don't see any real meaning

to the physical size.

In that case:

Lets say you want the cell to be Xmm


Use table.Cells[r, c].BestWidth

BestWidth is a preferred width for cell, in pixels or percents of table

width.

So then you need to know some info about the resoloution.

uses

  printers

var

  pixPerMMH: extended;

  widthMM: Integer;

//snip

  widthMM := GetDeviceCaps(Printer.Handle, HORZSIZE);

  pixPerMMW := PageRect.Right/widthMM;


You have to get the PageRect. I get it from RVPrint.OnPagePrepaint

So:

table.Cells[r, c].BestWidth := Round (Xmm  * pixPerMMW);



"." <mirror@127.0.0.1> skrev i meddelandet

news:MPG.1a301c458cbc49ca989681@news.trichview.com...

> Is there or will there ever be a facility to set the width of tables and

> cells by mm, cm or inches?

>

> If there is currently, how can I set this in a a richviewedit?

>

> Thanks in advance





Powered by ABC Amber Outlook Express Converter