change Diacritics colors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hmkaddoura
    New Member
    • Feb 2008
    • 18

    change Diacritics colors

    hi..
    any one knows how to color Diacritics differently from the text in RichTextBox..

    am able to do so in word application but not RichTextBox...

    Thanks..

    Regards,
    HK
  • balabaster
    Recognized Expert Contributor
    • Mar 2007
    • 798

    #2
    I can't find any reference to RTF supporting the ability to allow separate formatting of diacritic marks. But saying that, you mention you are able to do it in Word and I can't find any reference to Word supporting it either. Where did you find information on this?

    Comment

    • hmkaddoura
      New Member
      • Feb 2008
      • 18

      #3
      here we go:
      Gibt die 24-Bit-Farbe zurück, die für diakritische Zeichen in Dokumenten verwendet wird, die in Sprachen mit Schreibrichtung von rechts nach links verfasst sind, oder legt diese Farbe fest. Kann eine beliebige gültige WdColor Konstante oder ein Wert sein, der von der RGB-Funktion von Visual Basic zurückgegeben wird.

      Comment

      • balabaster
        Recognized Expert Contributor
        • Mar 2007
        • 798

        #4
        Hmm, that's rather intriguing...ho w about this...it's probably not the solution that you'll end with, but it may spark some ideas on how to achieve it.

        I have no idea to set the colour of a diacritic mark in Microsoft Word, but it seems we can create a word document programmaticall y that contains such an element. Save the document we create, open it in Word and then save it out as an RTF document. If RTF supports this functionality, then you should be able to open the RTF in notepad to view the markup that achieves this. You should then consequently be able to deduce how to achieve this markup programmaticall y.

        Comment

        • hmkaddoura
          New Member
          • Feb 2008
          • 18

          #5
          I thought of this as well..and when I tried it i found the following:
          1) whenever you copy the words and diacritics (although the words are in black and diacritics in red) and paste it to a richbox, all will appear with the same color.

          2) when I did what you suggested, I opend the rtf using ms word, each one has its color, but if I open it in wordpad, all have the same color, which get me crazy.

          I looked at the code and it is not normal rtf... with something like
          {\*\xmlnstbl {\xmlns1 http://schemas.microso ft.com/office/word/2003/wordml}}

          seems special format with office.

          Regards,
          HK

          Comment

          • balabaster
            Recognized Expert Contributor
            • Mar 2007
            • 798

            #6
            This suggests that the RTF format doesn't support separately colored diacritics and that Word is really providing a workaround for the scenario.

            Comment

            Working...