trichview.com

trichview.support




Re: How to insert a table by code?


Return to index


Author

Message

Muhammad

Posted: 05/22/2003 12:05:14


And Finally simply:

1- Create a variable of kind TRVTableItemInfo (Note: unit "RVTable" must

included in uses list)

2- Initialize this variable using CreateEx method of TRVTableItemInfo class

like this:

    Table := TRVTableItemInfo.CreateEx(DM.qryAyat.RecordCount + 1, 4,

RV.RVData); // create a table object


3- change apearence of Table using methods like BorderStyle, BorderColor,

BorderWidth, CellPadding, so


4- Merge any cells you like using MergeCells method (read help for more

information)


5- Modify content of every cells using Cells[Row, Col] Object like this:

Table.Cells[0, 0].AddNL('Text', 0, 0);

Note: Clear Cells[Row, Col] with .Clear method if you want!


6- add created table to TRichView or TRichViewEdit or DB-Aware version of

these both components like here:


  RV.AddItem('', Table); // Add Talbe object inside RichView


7- Format TRichView to apear content:

  RV.Format; // Format RichView to apear content



And If you want to create a word procceing program then refer to use

RichView Action!

RichView Actions is free addon package that can be used for creating word

proccesor like programs


Regards


"Tran Duc Quan" <quantd@ssp.com.vn> wrote in message

news:3ecc55af@support.torry.net...

> Hi,

> I am new to TRichView.

> How can I do to insert a table to TRichView ?

> Thanks for your time.

>

> Regards,

>

> Quan

>

>





Powered by ABC Amber Outlook Express Converter