Beiträge von Stef Merlijn

    Hi,

    In a WPRichEdit I have added some bullets. For this I use action: WPABullets1
    This works fine when I add the standard bullet to a document and print it directly.

    But when using SaveToFile, making sure it is in RTF format, if I reopen the document all bullets are lost when the document is printed.
    (ie the formatting of the line stays, but the bullet itself does not show)
    Also when I change the format of the bullets to f.e. squares the same happens.

    Is there some way to correct this?

    After some testing I found out the following:

    For changing the textcolor apparently you need to setup two events in order to get it to work:

    Code
    procedure TForm1.mbTextColorChange(Sender: TObject);begin  WPTEditor.SelectedTextAttr.SetColor(mbTextColor.Color);end;procedure TForm1.mbTextColorCurChange(Sender: TObject);begin  If WPTEditor.Changing then    WPTEditor.ChangeApplied;end;

    Where f.e. for the textmarker one event will do nicely:

    Code
    procedure TForm1.mbMarkerChange(Sender: TObject);
    begin
      If WPTEditor.Changing then
      begin
        WPTEditor.SelectedTextAttr.SetBGColor(mbMarker.Color);
        WPTEditor.ChangeApplied;
      end;
    end;

    At least I got it working now.

    Hi,

    The OnChange-event of TRichText is not fired when changing fontcolor, but when adding/replacing/moving tekst it is fired correctly.
    I use USEDEVEXPRESS.

    What can be a reason why this OnChange-event isn't fired?

    Hi,

    It seems to be a little different.
    The customer copies text from MS Word to TRichText. The copied text has font Myriad Pro. This font is available in MS Word, but not in the ComboBox where all fonts are loaded into by:

    Code
    ComboBox1.Items := Screen.Fonts;

    When the copied text in TRichText is selected the correct font is however shown in the combobox, but even then It's still not available in the dropdown.

    When the user selects some other text in TRichText (f.e. Arial). The text can even be changed into "Myriad Pro", by typing the fontname into the combobox and pressing enter.

    So what could cause a font to be available in MS Word but not in Screen.Fonts? Does MS Word look at another place?

    Hi,

    I use the code below to populate the installed fonts into a combobox.
    One of my customers installed a new font "Myriad pro" (on Windows 7), but this font doesn't always become available in the combobox of my application.

    The TWPRichText contains some mergefields, that were placed inside the component at designtime.
    When a user selects these mergefields, the new font isn't available. When he selects any other part of the text in the TWPRichText, the font is shown.

    Is there any way to solve this?

    Code
    // fill the combo with Font names
     ComboBox1.Items := Screen.Fonts;

    Hi,

    I'm using USEEXPRESSBARS
    Textcolor to textbackgroundcolor in the editor are changed by following procedures.

    Code
    procedure TForm1.mbBGColorChange(Sender: TObject);begin  WPRichText.Changing;  WPRichText.SelectedTextAttr.SetBGColor(mbBGColor.Color);end;procedure TForm1.mbTextColorChange(Sender: TObject);begin  WPRichText.Changing;  WPRichText.SelectedTextAttr.SetColor(mbTextColor.Color);end;

    When scrolling through the text, I want mbBGColor and mbTextColor to reflect the current color under the cursor.

    I thought of using OnChangeCursorPos event, but don't know how to get the color under the cursor and set it to the controls. Like:

    Code
    procedure TForm1.WPRichText1ChangeCursorPos(Sender: TObject);
    begin
     mbTextColor.Color := WPRichText1.SelectedTextAttr.GetColor.....???
     mbBGColor.Color   := WPRichText1.SelectedTextAttr.GetColor.....???
    end;

    Can you give me some samplecode on how to set this up?