trichview.com

trichview.support




Re: cell vertical alignment


Return to index


Author

Message

Sergey Tkachenko

Posted: 09/05/2003 14:59:03


I added the following code in the ActionTest demo:

procedure TForm3.Button2Click(Sender: TObject);

var table: TRVTableItemInfo;

    i, d: Integer;

begin

  Table := TRVTableItemInfo.CreateEx(3, 1, RichViewEdit1.RVData);

  d := 0;

  for i := 0 to 2 do

  begin

    Table.Cells[i + d, 0].BestWidth := 20;

    Table.Cells[i + d, 0].BestHeight := 40;

    Table.Cells[i + d, 0].VAlign := rvcMiddle;

    with Table.Cells[i + d, 0].GetRVData do

    begin

      Clear;

      AddNL('+', 0, -1);

    end;

  end;

  RichViewEdit1.InsertItem('', Table);

end;


(I have changed BestHeight to 40 because 20 is too small, so you cannot be

sure about vertical alignment).

Screenshot is attached.



begin 666 valign.gif

M1TE&.#EA20"W`+,``/___]30R)S?_X" @ !TO_^_=-^<2$! 0 ``2 ``````

M`````````````````````"P`````20"W```$_C" $,:4E>K-N_]@"%X6-9QB

MJJXJ>;%P++MR;8ONJ>]\[__ H!#E`AB/R*1RR6PZGQ/:9TBM6G>8RJLS.'B_

MX+!X3"Z;O=F2!##8=*'PN-R8ODS:FO=\ST?6*7=N!WV$>W\8>":#1PE+C4J/

MA5"'@7F+1I%0F9)-E!F6C ";3:.<2IZ)%9>-D0FLF*Z8ID^H@K*WCYNOLYU2

ME8JWHKBPL:6\=+Z?P**NL<+"K<_'I\FI;[K/N]#32[6@V+G$VMQ'WLODIN:J

MZ+/J>NR2[I?PA(<ZMO2%AQZI-_XX)K9PR,<IS96#" ]F(0C/8,*'$'VD.4.Q

MHL6+7R8R)*=QX[2._AYY@0R9CL0\DO%,)OFG@>#(* 5=JO0C, 9,>B\QU+O9

M<&8YGG-TYLL)5(Y0G#Z1K>%SM.<YI3N7.EU'4VK0HAR31K%J%"LWHESC-&4'

M-JK,IUO-#M4ZMFO8KVR]3I)[K&R?MEG1XH6S]V/<MW,!U_VK%JE>ND[Z#CZ\

MU `!MV>I_FS\6"SB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