Built-in text editor

Post Reply
Natter
Posts: 1233
Joined: Mon May 14, 2007 9:49 am

Built-in text editor

Post by Natter »

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 ?
User avatar
nageswaragunupudi
Posts: 10702
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 6 times
Contact:

Re: Built-in text editor

Post by nageswaragunupudi »

Richedit
Regards

G. N. Rao.
Hyderabad, India
Natter
Posts: 1233
Joined: Mon May 14, 2007 9:49 am

Re: Built-in text editor

Post by Natter »

Thank you mr.Rao. As In RichEdit to describe tables ?
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Built-in text editor

Post by cnavarro »

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
Natter
Posts: 1233
Joined: Mon May 14, 2007 9:49 am

Re: Built-in text editor

Post by Natter »

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).
User avatar
Antonio Linares
Site Admin
Posts: 42395
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 10 times
Been thanked: 41 times
Contact:

Re: Built-in text editor

Post by Antonio Linares »

RTF - Rich Text Format (.rtf extension) - working with tables

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

Antonio Linares
www.fivetechsoft.com
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Built-in text editor

Post by cnavarro »

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
Natter
Posts: 1233
Joined: Mon May 14, 2007 9:49 am

Re: Built-in text editor

Post by Natter »

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

FW 17.12
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Built-in text editor

Post by cnavarro »

Please try with

Code: Select all | Expand


  oRtf:InsertTable( nRows, nCols )
 


or

Code: Select all | Expand


   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
Natter
Posts: 1233
Joined: Mon May 14, 2007 9:49 am

Re: Built-in text editor

Post by Natter »

I even rewrote (overread) method InsertTable() in your program. RTInsertTable5() returns TRUE. All good, but table is not inserted
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Built-in text editor

Post by cnavarro »

Please look

Image
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
Post Reply