Beiträge von Dario Bisleri

    I have made diverged proofs but of made nothing doesn't change. where mistake?

    procedure TEditorForm.Aggiungi(RowNr, ColNr: Integer; par: TParagraph);
    var
    j : integer;
    str : string;
    begin
    par.ASet(WPAT_BOXWIDTH, WPCentimeterToTwips(3));
    par.ASet(WPAT_BoxWidth_PC, 50);
    par.ASet(WPAT_BoxMarginLeft, WPCentimeterToTwips(-25));
    par.ASet(WPAT_BoxMarginRight, WPCentimeterToTwips(10);
    ..
    .
    Thanks

    How could I mail the dimension (width) of a table that otherwise widens to all the page?
    WPTools_5.202

    procedure TEditorForm.CreaTab(numeroRecord: integer);
    begin
    edRichText.ClearSelection(TRUE);
    Screen.Cursor := crHourGlass;
    if ConfigManager.ReadCfgBoolean(CFG_GENERALE, CFG_GRIGLIA_TABLE) then
    begin
    edRichText.TableAdd(2, numeroRecord, [wptblActivateBorders], nil, AggiungiCelleSpirometrie)
    end
    else
    edRichText.TableAdd(2, numeroRecord, [], nil, Aggiungi);
    Screen.Cursor := crDefault;
    end;

    procedure TEditorForm.Aggiungi(RowNr, ColNr: Integer; par: TParagraph);
    var
    j : integer;
    str : string;
    begin
    // par.ASet(WPAT_BOXWIDTH, WPCentimeterToTwips(10));
    // par.ASet(WPAT_BOXMARGINLEFT, 2);
    case ColNr of
    1: par.ASetColumn(WPAT_COLWIDTH, 1150); // Data Visita
    2: par.ASetColumn(WPAT_COLWIDTH, 500); // Valore FCV
    end;
    Par.ClearCharAttributes(false);
    par.ASetFontName(FFontName);
    par.ASet(WPAT_CharFontSize, 100 * FFontSize);
    .
    .
    .
    Thanks

    Thanks Julian now work well

    Contents.MergeAttr.SetStyles([afsProtected]);
    Contents.StringValue := SicurezzaModule.Ritorno(trim(cartellaModule.tbUtenti.fieldByName('MEDICO').AsString));
    Contents.MergeAttr.SetStyles([afsProtected]);
    edRichText.ProtectedProp := [ppProtected, ppProtectSelectedTextToo];


    Ciao

    i try with:

    edRichText.ProtectedProp := [ppIsTextObject, ppIsInsertpoint, ppIsMergedText,ppProtectSelectedTextToo,ppNoEditAfterProtection,ppInsertBetweenProtectedPar];
    edRichText.CurrAttr.AddStyle([afsProtected]);
    edRichText.InputString(SicurezzaModule.Ritorno(trim(cartellaModule.tbUtenti.fieldByName('NAME').AsString)));

    but they come jammed also the fields successive, I would want block only NAME, you could do me an example please

    if post a comment on
    // edRichText.ProtectedProp := [ppIsTextObject, ppIsInsertpoint, ppIsMergedText,ppProtectSelectedTextToo,ppNoEditAfterProtection,ppInsertBetweenProtectedPar];

    don't work :( :?

    I have for example 3 fields

    NAME, SURNAME, ADDRESS

    and I want to bloked ONLY the NAME field in modification and elimination,
    leaving the other free fields.
    I have tried with
    [edRichText.ProtectedProp]:=[ [ppIsInsertpoint], [ppIsMergedText], [ppProtectSelectedTextToo]];
    [edRichText.InputString] ([cartellaModule.tbUtenti.fieldByName] ('NAME') .AsString));

    it work, but I then don't can SURNAME modification and ADDRESS
    it blocked ALL

    thank you

    WpTools 5
    For an other job, different from my preceding mail, I have tried ReplaceTokens('@@ ,' '@@ ') on a text of this type
    @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxx @@

    @@ yyyyyyyyyyyyyyyyyyyyyyyyyyyyy @@

    here the result

    yyyyyyyyyyyyyyyyyyyyyyyyyyyyy @@

    like I could resolve

    hi

    I have tried in this way and it work
    it cancel the part of text between XX. .XX
    bat it leave me in field<< name>> without<<>> written name

    ....
    begin
    pfine := 0;
    pinizio := 0;
    with edRichText.TextCursor do
    if edRichText.Finder.Next('XX') then
    begin
    pInizio := edRichText.Finder.Position;
    SelectText := TRUE;
    edRichText.Finder.Next('XX');
    pFine := edRichText.Finder.Position;
    end;

    edRichText.SetSelPosLen(pinizio, (pfine - pinizio) + 2, FALSE);

    // edRichText.ClearSelection;


    hi

    Bla bla bla bla aaaaaaaaaaaaaaaaaa

    XX bla bla bla ……. XX
    <<name>>

    XX bla bla bla eeeeeeeeeeeeeee XX
    <<surname>>


    other text
    -----------------------------------------------

    what I want to ... es. if name is nothing

    Bla bla bla bla aaaaaaaaaaaaaaaaaa
    here removed the [name] and shortened the text
    bla bla bla eeeeeeeeeeeeeee
    Mr. Travolta


    other text

    -----------------------------------------------

    but if I do

    if edRichText.Finder.Next('XX') then // only for text that I want to maintain
    edRichText.Finder.FoundText := '';

    edRichText.ReplaceTokens('XX', 'XX'); // only for text that I want delete
    edRichText.InsertPointAttr.Hidden := true;
    edRichText.MergeText;

    ... ReplaceTokens removes me all, I instead want to remove only the interested part.
    And then continue to try the text maintaining the pointer in the correct position


    Hi and thank you