Error using SelectAll / SelText

  • Hi;

    Working with WP4 I can SelectAll and then assigning SelText to a new value; or also I can delete the whole selection inserting #127. I can't do the same with WP6. For example:

    procedure Test;
    begin
    with WPRichText1 do
    begin
    Text := 'This is the old text ';
    SelectAll;
    SelText := 'This is the new text';
    end;
    end;

    This example finishes with "This is the old text This is the new text" in WP6, but it must be only "This is the new text". Similar problem if I do:

    procedure Test;
    begin
    with WPRichText1 do
    begin
    Text := 'This is the old text ';
    SelectAll;
    InputString('This is the new text');
    end;
    end;

    As the documentation of WP6 does not say to much about SelectAll and SelText, I can't find what is missed.

    Any idea?

    Felipe.

  • Hi Wolfgang;

    Noup, I also tried both ideas but they don't do the trick. Is this a bug?. By the way, I am using a normal TWPRichText component with all the defauls; I only changed to wpPlayNormal.

    Regards,

    Felipe.