Built-in text editor

Built-in text editor

Postby Natter » Sat Jan 06, 2018 8: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 ?
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: Built-in text editor

Postby nageswaragunupudi » Sat Jan 06, 2018 8:46 pm

Richedit
Regards

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

Re: Built-in text editor

Postby Natter » Sat Jan 06, 2018 8:55 pm

Thank you mr.Rao. As In RichEdit to describe tables ?
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: Built-in text editor

Postby cnavarro » 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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Built-in text editor

Postby Natter » Sun Jan 07, 2018 7: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).
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: Built-in text editor

Postby Antonio Linares » Sun Jan 07, 2018 9:32 am

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

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42127
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Built-in text editor

Postby cnavarro » 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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Built-in text editor

Postby Natter » Thu Jan 11, 2018 7:51 am

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

FW 17.12
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: Built-in text editor

Postby cnavarro » Thu Jan 11, 2018 12:47 pm

Please try with

Code: Select all  Expand view  RUN

  oRtf:InsertTable( nRows, nCols )
 


or

Code: Select all  Expand view  RUN

   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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Built-in text editor

Postby Natter » Thu Jan 11, 2018 1:37 pm

I even rewrote (overread) method InsertTable() in your program. RTInsertTable5() returns TRUE. All good, but table is not inserted
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Re: Built-in text editor

Postby cnavarro » Thu Jan 11, 2018 5:58 pm

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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 52 guests