Beiträge von Bobby

    I don't have the option of changing it at this point.

    There's not a way to force the changed flag in the data aware rtf?

    Changing
    MergeText
    ChangeApplied

    Doesn't seem to work.


    I'm confused on how, if the text in the rtf visibly changes or it's font or style visibly changes, meaning the RTF is aware of a change and has redrawn it on the screen, why it doesn't update the changed flag.

    How can I absolutely positively without exception force onChange to fire on my DBWPRichText whether anything was changed or not?

    I'm still having problems where some things just will not force the onChange, despite calling Changing and ChangeApplied.

    That seems to work fine, thanks.

    like this

    Code
    str:=TWPStringBuilder.Create;  par:=DBWPRichText3.FirstPar;  while par<>nil do begin    str.Append(par.GetAllText(false,true));    str.Append(#13#10);    par:=par.next;  end;


    One possible alteration.

    I've been doing something similar to write out text files where the lines were a fixed width.
    Like this:

    Code
    str:=TWPStringBuilder.Create;
      par:=DBWPRichText3.FirstPar;
      while par<>nil do begin
        for i:=0 to par.LineCount-1 do begin
          str.Append(par.GetLineText(i);
          str.Append(#13#10);
        end;
        par:=par.next;
      end;

    Any way to combine the two so I can have my fixed width lines with the numbers?

    Is there a simple way to preserve the RTF numbered lists when exporting to text format?

    I'm using the stringbuilder to build out my text output but in every case I lose the numbers from my numbered lists.

    For an example, create a numbered list in the WordPad5 demo and save as text. The numbers will be lost, but the text preserved.

    What is the recommended method?

    I've tried several ways of getting at this but can't seem to get it working.

    I have one header in my document, first page only.

    What is the most simple way to copy the lines of text from this header into a memo?

    I'm using the stringbuilder method to copy the body line by line as plain text. I just need to find a way to prepend the body with this one header's content.

    Thanks

    They don't need any editing features, only to be able to select the text. I use this as a pop up style preview dialog, they aren't looking at the RTF, only the preview. Simple selection in the dialog would work best and saves adding another form. I'll have to find some other way to do it. Thanks

    Ok, was very easily able to reproduce this in the 5.48(47.5) Wordpad5 demo.

    Run the demo app.
    Type in words until the line wraps down to the next line and type in a few more words.

    Like this:
    This is a test. This is a test. This is a test. This is
    a test.

    Now, move the cursor to the front of the first letter in the first line. Hold down shift and press the down arrow ONCE. The first line will highlight and the cursor will move to the start of the second line but NONE of the second line will be selected. Press control C to copy. Move farther down the page and paste. Please also note that you CAN also reproduce this using the mouse to select the text. The trick is to get the first line selected and only the cursor on the second line with no text selected. With the mouse you have to play with it to get it to that state, but it's easy, and produce the same problem.

    You can see that either nothing will paste if your clipboard was empty or they current content of the clipboard will be pasted. When copying in this method, nothing is copied to the clipboard. Selecting the entire block of text, even with the keyboard, works fine. In my own app, clicking the copy button produced the same results with the selection method used above.

    There is clearly some issue with the default copy function when the selected text is in a certain state.

    I have no shortcuts assigned to CTRL C. But that shouldn't change whether it worked sometimes or not, it would always fail.

    It appears that the method of selection is what is causing the problem, not the actual copytoclipboard. Almost like the rtf doesn't recognize the current seltext if you use shift and arrows to make the selection.


    In the cases with my users, the previously copied text is still in the clipboard buffer indicating that nothing in the current copy was actually loaded.