This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

Re:Syntax Edit - How do I change colorscheme while application is running

I need to be able to adjust some colors based on options picked by the user in a "color options" dialog. It can produce the necessary XML statements within my code, and would then like to create a new color scheme collection item, and make it current. Ideally, I would just alter the current color scheme directly.

I have not been able to change a color scheme collection from within my program (other than to set an existing "design-time" scheme to current). Do you have any examples, or can you provide me with the 2 or 3 lines of code that I suspect are needed. My environment is C++ Builder 2007.

Thank you!

Comments


  • This works...
      AnsiString xml = new_xml_statements;
      TLMDEditParserSchemeCollectionItem *item = text1Doc->ColorSchemes->FindItem("DefaultColor");
      try
      {
        item->Scheme->Text = xml;
      }
     .........
  • Please look how to achieve this in provided with the package demo. The demo provides the capability to edit active syntax/color schemes.
Sign In or Register to comment.