FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Built-in text editor
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Built-in text editor
Posted: Sat Jan 06, 2018 08:43 PM

Hello,

I need to embed in your program text editor for RTF files. Can I use any ActiveX editor or do I need to create a RichEdit ?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Built-in text editor
Posted: Sat Jan 06, 2018 08:46 PM

Richedit

Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Built-in text editor
Posted: Sat Jan 06, 2018 08:55 PM

Thank you mr.Rao. As In RichEdit to describe tables ?

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Built-in text editor
Posted: Sat Jan 06, 2018 11:46 PM

Please, To see how the main features of the Richedit control are implemented, see the examples TestRtf.prg and TestRtf5.prg (this example explains how to insert a table) into the samples folder of Fivewin

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Built-in text editor
Posted: Sun Jan 07, 2018 07:33 AM

I've looked at examples with RichEdit and wrote the editor. But there are no examples for working with tables.
Many years ago there was a class TAppBox (for embedding other applications in your window).

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Built-in text editor
Posted: Sun Jan 07, 2018 09:32 AM
RTF - Rich Text Format (.rtf extension) - working with tables

http://www.pindari.com/rtf3.html
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Built-in text editor
Posted: Sun Jan 07, 2018 12:47 PM
Natter wrote:I've looked at examples with RichEdit and wrote the editor. But there are no examples for working with tables.
Many years ago there was a class TAppBox (for embedding other applications in your window).


Which version of Fw do you use?
Do not have the example TestRtf5.prg in the samples folder?
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Built-in text editor
Posted: Thu Jan 11, 2018 07:51 AM

Use the example TestRtf5.ptg. I can not inser a table. All works correctly but table doesn't appear.

FW 17.12

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Built-in text editor
Posted: Thu Jan 11, 2018 12:47 PM
Please try with

Code (fw): Select all Collapse
  oRtf:InsertTable( nRows, nCols )


or

Code (fw): Select all Collapse
   oRtf:aTableFormat[ 1 ] := nRows
   oRtf:aTableFormat[ 2 ] := nCols
   oRtf:aTableFormat[ 3 ] := 20
   oRtf:aTableFormat[ 4 ] := 60
   oRtf:aTableFormat[ 5 ] := 0
   oRtf:aTableFormat[ 6 ] := CLR_WHITE
   oRtf:aTableFormat[ 7 ] := CLR_BLACK
   //{ nRows, nColumns, nHeightRows, nWidthColumn, nAlign, nColor1, nColor2 )
  RTInsertTable5( oRtf:hWnd, oRtf:aTableFormat )


and tell me
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Built-in text editor
Posted: Thu Jan 11, 2018 01:37 PM

I even rewrote (overread) method InsertTable() in your program. RTInsertTable5() returns TRUE. All good, but table is not inserted

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Built-in text editor
Posted: Thu Jan 11, 2018 05:58 PM
Please look

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces

Continue the discussion