Beiträge von Kym

    Thats what I did, theres a WPRichText on that form:

    procedure Tfrm_ri_modelos_editor.FormCreate(Sender: TObject);
    begin
    WPRichText.Header.MarginFooter := 0;
    WPRichText.Loaded;
    end;


    Still nothing happen, I cant find to remove the unused part of the footer.

    Sometimes I can't find how to do simple stuffs too. For example, to set the initial values for the editor (width, height, pagesize, etc), I had to manually set these using the rulers (horizontal e vertical), then save a document, and then everytimes I open the editor I load this document.

    One simple thing I'm trying to find out how to do is reduce the height of the ununsed area in the editor:

    [Blockierte Grafik: http://www.louman.com.br/kym/wptools.jpg]

    I want the vertical ruler to go to 30 not to pass 33, but I can't find where to set it.

    Hi,

    I have an instance of WPRichText with this:

    "My name is <name>"

    I want to replace "<name>" with the content of another WPRichText, so I did:

    WPRichText1.Finder.ReplaceAll("<name>",WPRichText2.AsString);

    The thing is, the replaced text apears as:

    {\rtf1\ansi\deff0\uc1\ansicpg1252\deftab720{\fonttbl{\f0\fnil\fcharset1 Arial;}{\f1\fnil\fcharset2 Wingdings;}{\f2\fnil\fcharset2 Symbol;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;\red128\green128\blue0;}\wpprheadfoot1\paperw12240\paperh20160\margl567\margr740\margt1167\margb2830\headery254\footery254\endnhere\sectdefaultcl{\

    If I do:

    WPRichText1.Finder.ReplaceAll("<name>",WPRichText2.Text);

    Then its OK, but I loose the formatting I had in WPRichText2.

    I tried with Finder using Finder.FoundText but it happens the same thing.

    So I ask, How do I replace the token <name> in WPRichText1 with the content of another WPRichText without loose the text format and without have this RTF code?

    Thanks

    I'm trying to add WPSPell to my project but I'm facing a lot of "file not found" issues:

    [DCC Error] E1026 File not found: 'WPSpell_Controller.res'
    [DCC Error] E1026 File not found: 'WPSpell_OptForm.dfm'
    [DCC Error] E1026 File not found: 'WPSpell_STDForm.DFM'

    Using: WPSpell_link, WPSpell_Controller, WPSpell_OptForm, WPSpell_StdForm;

    I own a copy of WPTools6 Standard and the WPSpell (bought together).

    What am I missing?

    I think the ReformatAll(False, False) did the job, it is printing now the total pages number, but it doesnt save the footer to the RFT file, its not a problem since I dont need to save, but is it the right behavior? Also, Can you just take a look at if it is the place to put the code?

    PS: I dont have any code in the OnTextObjGetTextEx.

    Finally, How do I set the font size only for the footer? I mean, I want Arial 11 to be used in footer, but I cant seen to find how to do it.

    Thanks!

    I'm trying to print the total pages in footer with this code:

    Everything prints fine, except the "wpoPageNumber", it prints nothing, and I get no error. The final result seens like:

    Página 1 de [blank] - 20/09/2010 18:56:00

    Where [blank] should say the total number of the pages.

    Using D2010 with WPT6, what am I missing?

    Thanks!

    Zitat von wpsupport

    Use ReformatAll(true, true)

    As I said in the first post, I already tried ReformatAll(True,True), still doesnt update the screen.

    Here's the code:

    Hello, no problem

    But I'm not using the DBWPRichText, I'm using the regular WPRichText, then I load the text from database using WPRichText.AsString := Field[].AsString.

    I know the text is updated because if I place the cursor over the lines that should be underlined the ToolBar shows the underline button correctly, but the only way I can update the screen is: save the data to the dabase and load it again with WPRichText.AsString := Field[].AsString.

    What I want to do is refresh the WPRichText (on the screen) without have to save it to database, got it?

    I tried to call "Changing" before and "ChangedText" after the changes, but still doesnt work, in fact, theres no ChangedText property or procedure in WPRichText.

    I'm trying to do the same thing now in Delphi 2010 with WPTools6 but the paragraph is not protected anymore, does anything changed from WPTools5 to 6 to do the same thing?

    Here's my code:

    Code
    var  mem : TMemoryStream;  myWP : TWPRichText;begin  inherited;  if modo_impressao then begin    try      myWP := TWPRichText.Create(Self);      myWP.Visible := False;      myWP.Parent  := frm_ri_prot_ap_editor;      myWP.Memo.DisableProtection;      myWP.HideSelection;      myWP.CPPosition := MaxInt;      myWP.CurrAttr.AddStyle([afsProtected]);      myWP.SelectionAsString := sds_ri_prot_apTEXTO.AsString;      myWP.CurrAttr.DeleteStyle([afsProtected]);      myWP.Memo.EnableProtection;      mem := TMemoryStream.Create;      try        myWP.SaveToStream(mem);        mem.Position := 0;        WPRichText.CPPosition := MaxInt;        WPRichText.Memo.LoadFromStream(mem, true, '', true, nil, AfterLoadEvent);        WPRichText.InsertPar;      finally        mem.Free;      end;    finally      FreeAndNil(myWP);    end;  end;

    And the AfterLoadEvent:

    Just to remember, I'm trying to add a text loaded from database as a protected paragraph into a WPRichText.

    Thanks in advance,
    Kym

    EDIT: The text is added to the WPRichText but its not protected!

    I'm trying to add some styles to the text using:

    With the content of the WPRichText as the following:

    01) MARIA ANTONIA JACYNTHO DOS SANTOS PICCAGLI, brasileira, viuva, do lar, portadora do RG/SSP/SP nº e do CPF nº , uma parte ideal equivalente a sessenta por cento (60%);

    The bold part is where I'm adding the underline style.

    When I run the code, I can see that the style is updated with the Underline option, but the screen is not updated unless I save it to the database and load again.

    I tried to refresh with .Refresh, .DelayedReformat and .ReformatAll but none of these seen to update the screen, what am I missing?

    PS: Using Delphi 2010 and WPtools 6.