Delphi and Kylix

Moderators: pritaeas
Number of threads: 7264
Number of posts: 19073

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Colour Schemes in Delphi Posted by sarkiemarkie on 4 Jan 2006 at 2:50 PM
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
Report
Re: Colour Schemes in Delphi Posted by jobromedia on 4 Jan 2006 at 5:06 PM
: 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:

// 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;

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.
Report
Re: Colour Schemes in Delphi Posted by porodoro on 5 Jan 2006 at 3:46 AM
: : 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:
:
:
: // 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;
: 

: 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)



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.