trichview.com

trichview.support




page setup and margins


Return to index


Author

Message

Michael Philbrick

Posted: 12/06/2004 1:52:31


Sergey,


First, I am very pleased with TRichView, your documentation and support,

and the ease of moving my complex code from another word processing component.

Just wanted you to know ... :-)


I am trying to understand how to work with the layout features of TRichViewEdit.

I have read various newsgroup posts and examined the documentation. I realize

that the margins for the page setup and the margins for TRVRuler measure

different things and are additive. For example, if the left margin of RVPrint

is set to 10 mm and the LeftMargin of TRichViewEdit is set to 15 mm, the

resulting printed document will have a combined left margin of 25 mm.


Based on this understanding, do you have any recommendations as to how I

can make this function for the user more like a typical word processor? I

don't mind doing calculations in code. To work like other applications, what

the user sees in page setup should be the same as what is on the ruler. If

the user sets the left margin in page setup to 30 mm, then it should show

the same in the ruler.


In concept, this seems easy. But in practice, I know there are issues in

converting pixels to mm, screen resolution differences, etc. My thought is

to set the margins in RVPrint to equal those on the ruler when the page setup

dialog is opened and then reset the ruler margins when it is closed. I would

always keep the RVPrint margins at zero (unless of course the dialog is opened).


The other issue is the MinTextWidth. Since this value as well as left/right

margins are saved as pixels, and screen resolutions can differ, I am not

sure how and what to save in a document so that when it is opened on another

computer it looks the same.


Could you give me some guidance on these issues? How would you best accomplish

this if you were in my position?


Mike





Powered by ABC Amber Outlook Express Converter