Page 1 of 1
Built-in text editor
Posted:
Sat Jan 06, 2018 8:43 pm
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 ?
Re: Built-in text editor
Posted:
Sat Jan 06, 2018 8:46 pm
by nageswaragunupudi
Richedit
Re: Built-in text editor
Posted:
Sat Jan 06, 2018 8:55 pm
by Natter
Thank you mr.Rao. As In RichEdit to describe tables ?
Re: Built-in text editor
Posted:
Sat Jan 06, 2018 11:46 pm
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
Re: Built-in text editor
Posted:
Sun Jan 07, 2018 7:33 am
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).
Re: Built-in text editor
Posted:
Sun Jan 07, 2018 9:32 am
by Antonio Linares
RTF - Rich Text Format (.rtf extension) - working with tableshttp://www.pindari.com/rtf3.html
Re: Built-in text editor
Posted:
Sun Jan 07, 2018 12:47 pm
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?
Re: Built-in text editor
Posted:
Thu Jan 11, 2018 7:51 am
by Natter
Use the example TestRtf5.ptg. I can not inser a table. All works correctly but table doesn't appear.
FW 17.12
Re: Built-in text editor
Posted:
Thu Jan 11, 2018 12:47 pm
by cnavarro
Please try with
- Code: Select all Expand view
oRtf:InsertTable( nRows, nCols )
or
- Code: Select all Expand view
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
Re: Built-in text editor
Posted:
Thu Jan 11, 2018 1:37 pm
by Natter
I even rewrote (overread) method InsertTable() in your program. RTInsertTable5() returns TRUE. All good, but table is not inserted
Re: Built-in text editor
Posted:
Thu Jan 11, 2018 5:58 pm
by cnavarro
Please look