Need expert comment

Need expert comment

Postby fraxzi » Thu Oct 09, 2014 2:41 am

Hi All,

I have this thoughts.

1. I want to display richedit text/format in xBrowse column. Is it possible?
2. Shall I use memo field or binary field (to store .rtf file), using SQL select command to retrieve. Which one is better?

Feel free to suggest positively.
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Need expert comment

Postby nageswaragunupudi » Thu Oct 09, 2014 3:08 am

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Need expert comment

Postby fraxzi » Thu Oct 09, 2014 3:47 am

RAO,

Thanks for the advise.

(1) In xbrowse (a) option, I thought this was already implemented in the latest FWH 14.x, I still use 12.x but upgrading to 14.9 next week.
I just want to display rtf including fonts, but it seems I need to convert rtf fields/file to text display which users might find it odd or too plain.
I am sure this future feature is pretty.

(2) using blob to store .rtf as file (could be easier) to send binary via sql (using ADS) command. But I still need to test this in my old snipit.
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Need expert comment

Postby nageswaragunupudi » Thu Oct 09, 2014 4:08 am

Option (a) is not implemented.
Option (b) is implemented but in a separate dialog.

But if you want to implement option (a), I think you should, we provide guidance.

It is good that you are upgrading. Apart from many major improvements, you will find using ADO with the latest version is extremely comfortable.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 88 guests