Page 1 of 1

How rvvaMiddle works?

Posted: Sun Nov 19, 2006 5:20 pm
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?

Posted: Sun Nov 19, 2006 6:19 pm
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.

Posted: Sun Nov 19, 2006 6:23 pm
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

Posted: Sun Nov 19, 2006 6:49 pm
by Sergey Tkachenko
It's planned for the end of this winter.

As for workaround, you can use tables.

Posted: Wed Nov 22, 2006 7:45 am
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

Posted: Fri Nov 24, 2006 9:13 pm
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?

Posted: Sat Nov 25, 2006 12:30 pm
by Sergey Tkachenko
Sorry, your schemes of tables looks corrupted (because of different character widths?), so I do not understand your question.

Posted: Sat Nov 25, 2006 2:37 pm
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

Posted: Sat Nov 25, 2006 3:03 pm
by Sergey Tkachenko
No, it's not possible in TRichView, merged cells still must be rectangular.