Changing ActiveText - Double click instead of Single Click

  • Hi Julian,

    In MSWord the Header and Footer inplace editing is fired using "DoubleClick", instead of "SingleClick" (you use MouseDown).

    Do you intend to create some property on EditOptions or EditOptionsEx for compatibility between WPTools and MSWord?

    Thanks in advance

    Alessandro

    • Offizieller Beitrag

    Hi,

    inplace editing is not a problem IF (and only IF) there is already a header/footer on this page.

    Otherwise a header/footer must be created, you can use the event OnClickCreateHeaderFooter

    This event makes it possible to set the 'range' for a newly created header or footer. It is triggered after a double click in the header or footer area.

    To abort the creation of a header or footer set the 'Range' to wpraIgnored.

    This is the default value unless the flag wpDblClickCreateHeaderFooter was used in property EditOptionsEx

    Julian

  • Hi Julian,

    The question is not about "Creating Header/Footer with Single/Double Click" but "Instead of Editing Header/Footer with a Single Click, only do this with DoubleClick, just like MSWord".

    I digged a little more and noted that while going in MouseDown, it calls TWPCustomRtfEdit.DontAllowLeaveRTFDataBlock. I think that this procedure could handle another EditOptionsEx, like wpChangeDatablockWithDoubleClick. And then, only in DoDblClick, change the Datablock to Header/Footer, also using this EditOptionsEx.

    What do you think?

    Alessandro