How rvvaMiddle works?

General TRichView support forum. Please post your questions here
Post Reply
mamouri
Posts: 63
Joined: Sat Aug 19, 2006 5:06 am

How rvvaMiddle works?

Post by mamouri »

Hi
I have a picture with height 100px. I add it to RichView and insert some long text after that:

Code: Select all

var
  Bitmap: TBitmap;
begin
  Bitmap := TBitmap.Create;
  Bitmap.LoadFromFile('C:\test.bmp');
  RV.AddPictureEx('', Bitmap, -1, rvvaMiddle);
  RV.AddNL(Memo1.Text, 0, -1);
  RV.Format;
The document layout is something like this:

Code: Select all

 ----------------------
|                        |
|                        |
|                        |
|                        |
|                        |Bla bla bla bla bla bla bla bla bla bla bla bla
|                        |
|                        |
|                        |
|                        |
 ----------------------
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla ......
I want to change this behavior to wrap the text along with the picture. some thing like this:

Code: Select all

 ----------------------
|                        |Bla bla bla bla bla bla bla bla bla bla bla bla
|                        |bla bla bla bla bla bla bla bla bla bla bla bla
|                        |bla bla bla bla bla bla bla bla bla bla bla bla
|                        |bla bla bla bla bla bla bla bla bla bla bla bla
|                        |bla bla bla bla bla bla bla bla bla bla bla bla
|                        |bla bla bla bla bla bla bla bla bla bla bla bla
|                        |bla bla bla bla bla bla bla bla bla bla bla bla
|                        |bla bla bla bla bla bla bla bla bla bla bla bla
|                        |bla bla bla bla bla bla bla bla bla bla bla bla
 ----------------------
I checked rvvaBaseLine and it's not working too. Is it possible? how?
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

No, it's not possible in the current version of TRichView.

All supported vertical align options
(
rvvaBaseline, // bottom of picture -> text baseline
rvvaMiddle, // center of picture -> text baseline
rvvaAbsTop, // top of picture -> top of line
rvvaAbsBottom, // bottom of picture -> bottom of line
rvvaAbsMiddle // center of picture -> center of line
)
align picture vertically relative to one line.

Planned for future.
mamouri
Posts: 63
Joined: Sat Aug 19, 2006 5:06 am

Post by mamouri »

Is there some workaround to implement this feature? or is it possible to get this effect using OwnerDraw and OnPaint method of RichView?

If not is it in todo list or not?

Thank you
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

It's planned for the end of this winter.

As for workaround, you can use tables.
mamouri
Posts: 63
Joined: Sat Aug 19, 2006 5:06 am

Post by mamouri »

Is it possible to merge cell 0, 1 with 1,1 and then merge new cell (0, 1) with cell 1,0.
For example I want to merge cells of Table A to appear like Table B.

Table A

Code: Select all

 ---------------------------------------------------------------
|                                        |                 |
|--------------------------------|----------------------------- |
|                                        |                 |
 ---------------------------------------------------------------
Table B

Code: Select all

 ---------------------------------------------------------------
|                           |                      |
|--------------------------------|                            |
|                                                           |
 ---------------------------------------------------------------
Every time I merge a merged cell with new cell RichView split merged cells.
Is it possible to merge a merged cell with anothor cell?

Regards
mamouri
Posts: 63
Joined: Sat Aug 19, 2006 5:06 am

Post by mamouri »

As I tested every time you merge a merged cell with new cell merged cell split to it's original cell.

So it's not possible? true?
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry, your schemes of tables looks corrupted (because of different character widths?), so I do not understand your question.
mamouri
Posts: 63
Joined: Sat Aug 19, 2006 5:06 am

Post by mamouri »

Hi
Sorry for bad description. Take a look to this image please:
Image

I want convert Original Table into Wanted.
It's not possible even in Microsoft Word. But I wonder may be it's possible in richview.
In fact I want such table for handling floating text around an image.

I hope that I'm now clear.

Thank you
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

No, it's not possible in TRichView, merged cells still must be rectangular.
Post Reply