Beiträge von keagle10

    I am using a TDBWPRichText component to access some RTF in a database. I want to extract lines of plain text from this, but want each line length to be no more than 80 characters. So I set WordWrap to False in the component, and set PageWidth in the Header property to 80. Then I use this code to get the text out of the editor: TextString:=RichTextEditor.AsAnsiString('ANSI', false, false); When I search TextString for CRLF combinations I can extract the separate plain text lines. This works, but it returns some lines of greater than 80 characters length, that is, there can be more than 80 characters of text between the CRLF combinations. Is there an easy way to extract the text in strings no greater than 80 characters in length? Thanks much for any help with this!

    Thanks again. I think you are right about the underlying dataset. The TDBWPRichText component is connected to a VARCHAR(500) rather than a memo blob. And I just noticed that it won't even save RTF at all, it all gets reverted to plain text. That is OK, I have lots of installed customers and can't change the DB, so they will just have to do without rich text in that field.

    I worked around the spell check reversion by reading the component's contents and setting the DB field after the check like this:

    CheckWPTools (AddictSpell1, CommentsBox, ctSmart);
    StudyTable['Sonographer Comments']:=CommentsBox.text;

    That works. Just curious why it won't work with a VARCHAR, but that's OK. Thanks much!

    Thank you. I verified that dataset is in edit mode, and also tried explicitly calling Edit again, but it still doesn't work.

    StudyTable.Edit;
    CommentsBox.Changing;
    CheckWPTools (AddictSpell1, CommentsBox, ctSmart);
    CommentsBox.ChangeApplied;

    After the spell check clicking in the CommentsBox reverts the text to what it was before the spell check.

    What else can I try?

    Using TWPRichText and executing SaveToFile will result in a zero byte file if the filename contains a dot. I noticed a post in the WPTools6 forum about this, but it still seems to be happening with WPTools 7. For example, if you
    select some text in a TWPRichText control and then call

    if CommentsDialogBox.Filename<>'' then CommentsBox.SaveToFile(CommentsDialogBox.FileName, true);

    will work only if the filename does not contain a dot, e.g. test.test

    Is there any workaround for this? Thanks for your help!

    Issue with WPTools 7 and Addict 4. I checked this forum for posts about
    WPTools 6 and thought this was fixed, but I am still having this problem...

    Using TDBWPRichText and Addict4, running the spell check and then clicking in the text box will revert to the pre spell check version. This happens even if Changing is called before the spell check. For example:

    CommentsBox.Changing;
    CheckWPTools (AddictSpell1, CommentsBox, ctSmart);
    CommentsBox.ChangeApplied;

    Everything works properly with TWPRichText, but not with TDBWPRichText.

    Thanks for your help with this!

    I just upgraded from WPTools 6 to WPTools 7 using Delphi 7. Everything seems OK and the form containing a WPRichEdit and WPToolBar look good at design time. The project compiles OK, but when I try to create the form with the WP components at runtime I get the error "Error reading WPToolBar1.ImageStretch:Property ImageStretch does not exist." The ImageStretch property does appear on the Object Inspector at design time.

    Thanks for your help with this.

    I am trying to install WPTools 7 (upgrading from WP Tools 6) into Delphi 7. I ran the installer and put the upgrade in \Program Files (x86)\WPTools7. I found the WPTools7_D7.dpk in \Program Files (x86)\WPTools7\D7 and opened it in Delphi. When I try to compile, I get a cascade of errors about "Error reading Stdicons.ColorDepth:Property ColorDepth does not exist. Ignore the error etc". If I Ignore All then in wpDefActions7 I get an error "File not found: 'System.Actions.dcu'. I have the Delphi Environment options include the browsing path to both \program Files (x86)\WPTools (where WPTools 6 is installed) and to \Program Files (x86)\WPTools7.

    I have previously tried to install for both Delphi 7 and XE3, but then uninstalled WPTools 7 and installed for only Delphi 7. Same errors.

    Please help! Thanks much!