TWPSymbolDlg usage

  • Couple of odd things when trying to use the TWPSymbolDlg control...

    If I invoke the dialog and chose a char from the font shown, it seems to work. However, if I pick a different font from the pulldown, and select a char, it initially displays using the current font, not the selected font. Saving and reloading the WPRichText causes it to dispaly properly.

    Note that I do a Refresh after calling Execute, but that does not display it properly... I still have to save and reload.

    One other thing... If the text cursor is at the end of the text, the dialog seems to default to the Wingdings font, not the current font. And even if I then pick from that Wingdings font, it initially displays using the current font, not Wingdings (but is OK once I save and reload).

    This is the code I use:

    Code
    procedure AddCharFromCharMap( richText: TWPRichText );
    begin
      with WPSymbolDlg1 do
      begin
        EditBox := richText;
        if Execute then
          richText.Refresh();
      end;
    end;

    WPTools 5.19, Delphi 7, WinXP

    Thanks,
    Eric