Change background colour keywords
Posted: Tue Jun 08, 2010 5:36 pm
We are new to TRichView and are getting ready to incorporate a trimmed-down version of the ActionsTest demo program editor into our application as our Rich Text editor.
When using your ActionsTest demo temporarily as a surrogate editor to perform other suitability / risk reduction tests we encountered the following problem:
- The Rich Text stored in the database will be presented as one of several columns in an InfoPower grid. The remaining columns are "normal" numeric, date and string columns. The Rich Text component of that grid uses the Microsoft Version 3 Rich Edit dll.
- To edit the Rich Text, the user will double-click the grid cell and the TRichView editor will pop up. We will first insert the database contents into that non-data-aware TRichView and the modified rich text will later be extracted and inserted into the database, thereby becoming visible in the grid cell.
- The RTF code generated by the TRichView for a piece of text whose background colour has been set by the user is:
words with \plain \f0\fs20\chcbpat7 background colour\plain \f0\fs20 changed,
This uses the "\chcbpat<N>" keyword followed by the "\plain" keyword. The InfoPower grid does not recognise that keyword, and ignores it, so the text background colour is not painted. The InfoPower grid does, however, correctly handle a "\highlight" keyword.
How can I configure the TRichView so that it generates either of the following RTF code sequences using the "\highlight<N>" keyword:
words with \plain \f0\fs20\highlight7 background colour\highlight0 \f0\fs20 changed,
words with \plain \f0\fs20\highlight7 background colour\plain \f0\fs20 changed,
Or is there some other way of doing this, maybe using Events ???
Or does someone know of a more capable grid that can handle more advanced Rich Text than the two we know: TwwDBRichEdit from InfoPower and TLMDDBRichEdit from LMDInnovative ??
Our requirements are: character formatting (bold, italics, underline, foreground and background colouring), multi-level bulleting and numbered lists (numbers and letters), and paragraph formatting limited to alignment left and right, indentation left and right, and single or 1.5 line spacing within and between paragraphs.
Thanking you in advance
---
JF
When using your ActionsTest demo temporarily as a surrogate editor to perform other suitability / risk reduction tests we encountered the following problem:
- The Rich Text stored in the database will be presented as one of several columns in an InfoPower grid. The remaining columns are "normal" numeric, date and string columns. The Rich Text component of that grid uses the Microsoft Version 3 Rich Edit dll.
- To edit the Rich Text, the user will double-click the grid cell and the TRichView editor will pop up. We will first insert the database contents into that non-data-aware TRichView and the modified rich text will later be extracted and inserted into the database, thereby becoming visible in the grid cell.
- The RTF code generated by the TRichView for a piece of text whose background colour has been set by the user is:
words with \plain \f0\fs20\chcbpat7 background colour\plain \f0\fs20 changed,
This uses the "\chcbpat<N>" keyword followed by the "\plain" keyword. The InfoPower grid does not recognise that keyword, and ignores it, so the text background colour is not painted. The InfoPower grid does, however, correctly handle a "\highlight" keyword.
How can I configure the TRichView so that it generates either of the following RTF code sequences using the "\highlight<N>" keyword:
words with \plain \f0\fs20\highlight7 background colour\highlight0 \f0\fs20 changed,
words with \plain \f0\fs20\highlight7 background colour\plain \f0\fs20 changed,
Or is there some other way of doing this, maybe using Events ???
Or does someone know of a more capable grid that can handle more advanced Rich Text than the two we know: TwwDBRichEdit from InfoPower and TLMDDBRichEdit from LMDInnovative ??
Our requirements are: character formatting (bold, italics, underline, foreground and background colouring), multi-level bulleting and numbered lists (numbers and letters), and paragraph formatting limited to alignment left and right, indentation left and right, and single or 1.5 line spacing within and between paragraphs.
Thanking you in advance
---
JF