Bounds checking for TRichViewEdit.

General TRichView support forum. Please post your questions here
Post Reply
fure
Posts: 6
Joined: Mon Sep 10, 2007 9:46 pm

Bounds checking for TRichViewEdit.

Post by fure »

I am looking for a way to bounds check the a TRichViewEdit object. What I am doing is filling in a TRichViewEdit object at run time with data read from a file. Then I am painting this information to a bitmap, and then sending it to a printer. The issue that I am running into is that since this is all done at runtime and is not visible, I have no way of knowing if some of the data would run past the dimensions of the TRichViewEdit control, which would be bad.

So, is there a way to check if any of the data (text or images) exceeds the specified dimensions of the TRichViewEdit control?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

When document in RV is formatted, it has width:
rv.RVData.DocumentWidth+rv.LeftMargin+rv.RightMargin;
height:
rv.DocumentHeight.
fure
Posts: 6
Joined: Mon Sep 10, 2007 9:46 pm

Post by fure »

Thank you for the quick reply. I tried this out and it does exactly what I wanted it to.
Post Reply