I.T. Discussion Community!
-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
-Collapse +Expand Delphi To/From
To/FromCODEGuides
-Collapse +Expand Delphi Store
PRESTWOODSTORE

Prestwood eMagazine

July Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyPascal and Delphi Coding BoardDelphi VCL Topic   Print This     

Using Delphi TColorGrid

Using Delphi TColorGrid in Delphi VCL topic (part of our Pascal and Delphi Coding group).

Quick Search: TColorGrid   Using Delphi   Using Delphi TColorGrid  
Badzooka
Citrus Heights, CA 95610
How do you specify which color to use with TColorGrid from the samples page? Why isn't it documented?
 Posted 18 years ago (Thread Starter)
Comment Quote
About Badzooka -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #6964, 4 replies
Thread Started 7/14/2002 9:04:00 AM
View Counter=4657
Last Reply Posted 7/15/2002 7:37:00 AM)
Location=Citrus Heights, CA 95610  
Joined=20 years ago   MB Posts=28  
Moderator
Mike Prestwood
Prestwood IT
Prestwood IT office in Citrus Heights, CA
Use the public methods ForegroundColor and BackgroundColor. For example, in the OnChange event of a ColorGrid component you could do the following:

procedure TForm1.ColorGrid1Change(Sender: TObject);
begin
Edit1.Font.Color := ColorGrid1.ForegroundColor;
Edit1.Color := ColorGrid1.BackgroundColor;
end;
None of the components on the "Samples" page are documented. They are included for demonstration purposes.

--
Mike Prestwood
Prestwood IT Solutions

 Posted 18 years ago
Comment Quote
About Mike Prestwood -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Mike Prestwood

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Web Presence
Facebook, Prestwood IT Facebook page -- fan page. (Visit Me)
Twitter, Follow Prestwood IT on Twitter. (Visit Me)
LinkedIn, Prestwood IT company page on LinkedIn. (Visit Me)
YouTube, Prestwood IT YouTube Channel (Visit My Channel)
Website, My drum website where I sell my drum books. (http://www.play-drums.com)

Post ID #6965 (Level 1.1)  Reply to 6964
Thread Started 7/14/2002 9:08:00 AM
View Counter=2
Location=Prestwood IT office in Citrus Heights, CA 
Joined=20 years ago   MB Posts=1410   KB Posts=1805   KB Comments=69   BLOG, Topics=4  
Moderator
Mike Prestwood
Prestwood IT
Prestwood IT office in Citrus Heights, CA
Since no documentation is provided for the components on the Samples page, you have to browse the properties surfaced in the Object Inspector AND browse the public methods listed in the source code. Here are the public declarations:
  public
constructor Create(AOwner: TComponent); override;
function ColorToIndex(AColor: TColor): Integer;
property ForegroundColor: TColor read GetForegroundColor;
property BackgroundColor: TColor read GetBackgroundColor;
The source code is located in \Source\Samples\ColorGrd.pas.

--
Mike Prestwood
Prestwood IT Solutions

 Posted 18 years ago
Comment Quote
About Mike Prestwood -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
About Mike Prestwood

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Web Presence
Facebook, Prestwood IT Facebook page -- fan page. (Visit Me)
Twitter, Follow Prestwood IT on Twitter. (Visit Me)
LinkedIn, Prestwood IT company page on LinkedIn. (Visit Me)
YouTube, Prestwood IT YouTube Channel (Visit My Channel)
Website, My drum website where I sell my drum books. (http://www.play-drums.com)

Post ID #6967 (Level 1.2)  Reply to 6964
Reply Posted 7/14/2002 9:49:00 AM
Location=Prestwood IT office in Citrus Heights, CA 
Joined=20 years ago   MB Posts=1410   KB Posts=1805   KB Comments=69   BLOG, Topics=4  
Badzooka
Citrus Heights, CA 95610
Thanks. That worked perfectly. How did you know how to do that?
 Posted 18 years ago (Thread Starter)
Comment Quote
About Badzooka -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #6966 (Level 1.3)  Reply to 6964
Reply Posted 7/14/2002 9:40:00 AM
Location=Citrus Heights, CA 95610  
Joined=20 years ago   MB Posts=28  
Most Recent Post
Badzooka
Citrus Heights, CA 95610
Thanks Mike.
 Posted 18 years ago (Thread Starter)
Comment Quote
About Badzooka -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #6977 (Level 1.4)  Reply to 6964
Reply Posted 7/15/2002 7:37:00 AM
Location=Citrus Heights, CA 95610  
Joined=20 years ago   MB Posts=28  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1121A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #6964 Counter
4657
Since 4/2/2008

Follow PrestwoodBoards on: 


©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech