Search found 9411 matches

by Sergey Tkachenko
Wed Nov 15, 2006 4:37 pm
Forum: Support
Topic: How to make a fontstyle format brush like in MS Word?
Replies: 7
Views: 21728

Ok, let we have RichViewEdit1: TRichViewEdit, linked to RVStyle1: TRVStyle. TextStyle: TFontInfo; // form's variable Reading current text format: TextStyle.Free; TextStyle := TFontInfo.Create(nil); TextStyle.Assign(RVStyle.TextStyles[RichViewEdit1.CurTextStyleNo]); Applying to the selection: var Sty...
by Sergey Tkachenko
Wed Nov 15, 2006 3:41 pm
Forum: Support
Topic: Adding a field that is a Formatted Memo field?
Replies: 4
Views: 14982

As for copying from TRichEdit, it's simple.
Use RichEdit.Lines.SaveToStream to write, and RichView.LoadRTFFromStream to read.
Formatting will be kept, assuming that
1) RichEdit.PlainText = False
2) RichView.RTFReadProperties.TextStyleMode= RichView.RTFReadProperties.ParaStyleMode=rvrsAddIfNeeded.
by Sergey Tkachenko
Wed Nov 15, 2006 3:17 pm
Forum: Support
Topic: Adding a field that is a Formatted Memo field?
Replies: 4
Views: 14982

As for the given visual layout, you can implement it using tables. Table with 2 columns and 1 row. In the first cell: 'Contest:' In the second cell: field which will be replaced to the formatted document. As for implementing fields where values are arbitrary formatted documents, see Demos\Delphi\Ass...
by Sergey Tkachenko
Wed Nov 15, 2006 3:01 pm
Forum: Support
Topic: Set tabs by buttonClick
Replies: 9
Views: 24116

j&b, so, as I understand, you need to create a paragraph style with the given tab stops to add some text lines formatted with this paragraph style. { This function returns index of paragraph style with the specified collection of tabs. If such paragraph style does not exist, this function adds i...
by Sergey Tkachenko
Wed Nov 15, 2006 2:33 pm
Forum: Support
Topic: Set tabs by buttonClick
Replies: 9
Views: 24116

Pieter, your code clears all existing tabs and then adds new tabs. My code adds new tabs in addition to the existing tabs. Without clearing, you should search if some tab exists at the given position (using ParaInfo.Tabs.Find), and, if exists, update its properties instead of adding a new tab. Using...
by Sergey Tkachenko
Tue Nov 14, 2006 9:19 pm
Forum: Support
Topic: Set tabs by buttonClick
Replies: 9
Views: 24116

Ok. Assuming that you do not use RichViewActions... All editing operations on paragraph attributes, including tabs, must be implemented using ApplyParaStyleConversion procedure + OnParaStyleConversion event. How to add this command to the demo in Demos\Delphi\Editors\Editor 2\: Open Unit1.pas. Find ...
by Sergey Tkachenko
Tue Nov 14, 2006 7:20 pm
Forum: Support
Topic: RichViewEdit.GetTextLen always "0"
Replies: 1
Views: 9342

GetTextLen simple uses WM_GETTEXTLENGTH message. Processing of WM_GETTEXT, WM_GETTEXTLENGTH, WM_SETTEXT was disabled for Delphi 2005 and 2006, because it conflicted with VCL implementation. Sorry, I do not plan to restore them. EM_GETTEXTLENGTHEX is not supported. Use the functions RVGetTextRange an...
by Sergey Tkachenko
Tue Nov 14, 2006 7:10 pm
Forum: Support
Topic: Crash on Print Preview (RichViewActions)
Replies: 1
Views: 11007

Confirmed. It may happen when previewing text formatted with raster (not TrueType) font.
Fix: Open RVStyle.pas, find two calls of RVU_GetTextExtentExPoint, change the 3rd parameter from Width*2 to $FFFFFFF.
by Sergey Tkachenko
Tue Nov 14, 2006 5:56 pm
Forum: Support
Topic: Printing Problem with tables!
Replies: 47
Views: 142130

You should be able too see it now.
by Sergey Tkachenko
Tue Nov 14, 2006 5:47 pm
Forum: Support
Topic: FastReport 3 Wrapper ?
Replies: 6
Views: 18380

Sorry, no
by Sergey Tkachenko
Tue Nov 14, 2006 5:46 pm
Forum: Support
Topic: Set tabs by buttonClick
Replies: 9
Views: 24116

As en edting operation (which can be undone by user)? For the selected paragraphs?
by Sergey Tkachenko
Sun Nov 12, 2006 1:31 pm
Forum: Support
Topic: How do I place the cursor on a defined position?
Replies: 4
Views: 14759

Yes, document should be reformatted after changing "show special characters" mode. Showing/hiding spaces and paragraph marks does require reformatting, but showing/hiding some Unicode characters (such as soft hyphens) requires reformatting.

Call RichViewEdit.Reformat.
by Sergey Tkachenko
Sun Nov 12, 2006 9:43 am
Forum: Support
Topic: Highlight and delete Fields?
Replies: 2
Views: 11145

Sorry, I am not sure that I understand the question.
1) What code is in this button's OnClick
2) Please give me examples of document text:
a) text what you want
b) text what appears
by Sergey Tkachenko
Sun Nov 12, 2006 9:38 am
Forum: Support
Topic: RTF Code Optimization
Replies: 15
Views: 38333

This problem was easy to fix. In CRVData.pas, in TCustomRVData.SaveRTFToStream, the following code if (Level=0) and (StartItem<>EndItem) and IsParaStart(EndItem) and (GetItemStyle(EndItem)>=0) and (Items[EndItem]='') then RVFWrite(Stream, '\par'); was changed to: if (Level=0) then RVFWrite(Stream, '...
by Sergey Tkachenko
Sun Nov 12, 2006 9:34 am
Forum: Support
Topic: How do I place the cursor on a defined position?
Replies: 4
Views: 14759

Format does not store the caret position, because Format is usually called when document is not formatted, so the caret position is undefined before its call.
If document is already formatted, why do you can Format? :)