Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

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

  • 3 Comments sorted by Votes Date Added

  • 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.