Issues with WPTools 5

  • Hello!

    In WPTools5 I still have some unresolved issues after my attempt so upgrade from WPTools 4.

    1) In my code I load the contents of WPRichText in the form constructor. I now want to place the cursor at the end of the text. This only works partially using ShowCursor as the cursor is placed at the end but when I start typing the cursor jumps to the beginning of the text.

    2) When I attach a TWPToolBar to a TWPRichText object the font-size indicator does not work very well. When I start working on a new (empty) text it works well but when I save and then reload in a new form the font-size is only displayed for text with a font-size different from the default font in the TWPRichText.

    3) In some of my forms the font is set differently depending on whether I enter the TWPRichText control using the mouse or by tabbing through the form. Tabbing shows incorrect results.

    I hope someone can help. Otherwise I will be happe to create a test-case (for Julian).

    Regards,
    Erik

    • Offizieller Beitrag

    >>1) In my code I load the contents of WPRichText in the form constructor. I now want to place the cursor at the end of the text. This only works partially using ShowCursor as the cursor is placed at the end but when I start typing the cursor jumps to the beginning of the text. <<

    CPPosition := MaxInt; before the ShowCursor should do it.

    >>2) When I attach a TWPToolBar to a TWPRichText object the font-size indicator does not work very well. When I start working on a new (empty) text it works well but when I save and then reload in a new form the font-size is only displayed for text with a font-size different from the default font in the TWPRichText. <<

    This is not a bug, it is a feature :-) - to provide stable paragraph support all default fonts are removed from the text. This can be deactivated when you define the compiler symbol DONT_FIX_DEFSTYLE and maybe also DONT_FIX_STYLES. The latter process paragraphs which have a style attached.

    >>3) In some of my forms the font is set differently depending on whether I enter the TWPRichText control using the mouse or by tabbing through the form. Tabbing shows incorrect results. <<

    I check if there is a problem left with the toolbar. It should report the default font if no forn is defined.

    Julian