Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Colour Schemes in Delphi

I know its possible to change colours by using programming but it is lost when you quit the program. is there anyway to make it permanent until it is changed

Comments

  • jobromediajobromedia Posts: 168Member
    : I know its possible to change colours by using programming but it is lost when you quit the program. is there anyway to make it permanent until it is changed
    :
    You can allways use the registry to keep track on the colors specified.

    Also know that the JEDI JVCL components contain a component that can store data within the application it self, and it can be very easily done.

    If you're using D7EE then you have colormap components stored in the Additional panel. Add one of them and write the colors to it's colors.

    The colormap components are nothing more or less then some sort of advanced TStringgrids so you can basically get around that way, and you can even use a Tmemo as well.

    Back to the JEdi component suite. Add a TJvDataEmbedder found on the JV None visual panel.

    Now basically you can do a code similar to this one:

    [code]
    // ColorSettings are the JvDataEmbedder component.
    // Colormap is either a colormap or a Tmemo.
    // Source1 is your color source 1.

    procedure WriteColors;
    var c:string;
    begin
    // First the color file is written to disk.
    ColorSettings.DataSaveToFile('tmp.txt');
    // The color is converted to a string.
    c := ColorToString(source1.color);
    // The ColorMap is cleared to make room for the new colors.
    ColorMap.clear;
    // The color is added.
    ColorMap.lines.add(c);
    // ColorMap is saving to the same file that was written by
    //ColorSettings.
    ColorMap.lines.SaveToFile('tmp.txt');
    // ColorSettings then loads the updated file.
    ColorSettings.DataLoadFromFile('tmp.txt);
    // The temporary file is deleted.
    DeleteFile('tmp.txt');
    end;
    [/code]
    Listen, I'll get back as soon as I have more routines to share, so stay tuned. And I'm gonna add them in this post.
  • porodoroporodoro Posts: 230Member
    : : I know its possible to change colours by using programming but it is lost when you quit the program. is there anyway to make it permanent until it is changed
    : :
    : You can allways use the registry to keep track on the colors specified.
    :
    : Also know that the JEDI JVCL components contain a component that can store data within the application it self, and it can be very easily done.
    :
    : If you're using D7EE then you have colormap components stored in the Additional panel. Add one of them and write the colors to it's colors.
    :
    : The colormap components are nothing more or less then some sort of advanced TStringgrids so you can basically get around that way, and you can even use a Tmemo as well.
    :
    : Back to the JEdi component suite. Add a TJvDataEmbedder found on the JV None visual panel.
    :
    : Now basically you can do a code similar to this one:
    :
    : [code]
    : // ColorSettings are the JvDataEmbedder component.
    : // Colormap is either a colormap or a Tmemo.
    : // Source1 is your color source 1.
    :
    : procedure WriteColors;
    : var c:string;
    : begin
    : // First the color file is written to disk.
    : ColorSettings.DataSaveToFile('tmp.txt');
    : // The color is converted to a string.
    : c := ColorToString(source1.color);
    : // The ColorMap is cleared to make room for the new colors.
    : ColorMap.clear;
    : // The color is added.
    : ColorMap.lines.add(c);
    : // ColorMap is saving to the same file that was written by
    : //ColorSettings.
    : ColorMap.lines.SaveToFile('tmp.txt');
    : // ColorSettings then loads the updated file.
    : ColorSettings.DataLoadFromFile('tmp.txt);
    : // The temporary file is deleted.
    : DeleteFile('tmp.txt');
    : end;
    : [/code]
    : Listen, I'll get back as soon as I have more routines to share, so stay tuned. And I'm gonna add them in this post.
    :
    Can you tell us how to install it ? i've tryed too but after installation i dont see any new menu.

    (ps after starting install.bat , jediinstaller.exe returns exception)
Sign In or Register to comment.