1. I want to display richedit text/format in xBrowse column. Is it possible?
Here again we have two options. (a) Display RTF in the cell in every row visible in the browse (b) Display an
indication like <rtf> in the cell in each row and display as RTF when user clicks the cell for edit.
(a) Possible but requires lot of work and modification to xbrowse, which can be handled by a derived class.
We need to allot larger row height initially and create an RTF contol in the cell for every visible row. We need to keep destroying controls that go out of visibility and creating new controls for rows the come into the visible area, when the browse is scrolled. We also need to resize the controls when the browse is resized, refreshed and so on.
(b) This is what xbrowse now does by default. When the user clicks the cell, the RTF is displayed in a separate dialog. You can change it to display in the cell area if you like.
I just advise you to use a database containing RTF in a column and browse. Study the existing behavior and then decide what you want to do.
2. Shall I use memo field or binary field (to store .rtf file), using SQL select command to retrieve. Which one is better?
If you use DBFCDX, you can store and retrieve RTF data in the Memo fields like any other text/binary data.
If you use any DBMS I recommend using BLOB fields or the requried size. Using ADO reading and writing binary data is very simple.
In particular, TXBrowse, TRecSet. TDataRow handle read/write of binary data from/to DBFCDX or Any ADO source transparently.