BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TColorbox returning colors as RGB values ??

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
peted@iinet.net.au
Guest





PostPosted: Mon Jun 21, 2004 10:10 am    Post subject: TColorbox returning colors as RGB values ?? Reply with quote



Is it possible for TColorBox to return selected colors as RGB numberic
values instead of clBlack etc, so ofcourse for black it would be
0.0,0.0,0.0


also can i set a custom defined selection of colors at design or
runtime for the user to select ??


any help appreciated
Back to top
Andrue Cope [TeamB]
Guest





PostPosted: Mon Jun 21, 2004 10:36 am    Post subject: Re: TColorbox returning colors as RGB values ?? Reply with quote



[email]peted (AT) iinet (DOT) net.au[/email] wrote:

Quote:
Is it possible for TColorBox to return selected colors as RGB numberic
values instead of clBlack etc, so ofcourse for black it would be
0.0,0.0,0.0

I'm not sure what you mean by that.

TColorBox::Selected returns a TColor and TColor is just an enunmerated
type defined as:

enum TColor {clMin=-0x7fffffff-1, clMax=0x7fffffff};

That is to say it takes any numeric value in that range. 'clBlack' is
just a convenient constant that at compile time gets converted into a
numeric value in the above range.

If you want to allow the user to select any colour then set Style to
'cbCustomColor'.

If you want to convert a TColor to RGB values use ColorToRGB()

--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html

Back to top
peted@iinet.net.au
Guest





PostPosted: Mon Jun 21, 2004 11:31 am    Post subject: Re: TColorbox returning colors as RGB values ?? Reply with quote




thanks muchly for that




On 21 Jun 2004 03:36:14 -0700, "Andrue Cope [TeamB]"
<no.spam (AT) spammy (DOT) com> wrote:

Quote:
peted (AT) iinet (DOT) net.au wrote:

Is it possible for TColorBox to return selected colors as RGB numberic
values instead of clBlack etc, so ofcourse for black it would be
0.0,0.0,0.0

I'm not sure what you mean by that.

TColorBox::Selected returns a TColor and TColor is just an enunmerated
type defined as:

enum TColor {clMin=-0x7fffffff-1, clMax=0x7fffffff};

That is to say it takes any numeric value in that range. 'clBlack' is
just a convenient constant that at compile time gets converted into a
numeric value in the above range.

If you want to allow the user to select any colour then set Style to
'cbCustomColor'.

If you want to convert a TColor to RGB values use ColorToRGB()


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Jun 21, 2004 5:57 pm    Post subject: Re: TColorbox returning colors as RGB values ?? Reply with quote


<peted (AT) iinet (DOT) net.au> wrote


Quote:
Is it possible for TColorBox to return selected colors
as RGB numberic values instead of clBlack etc, so of
course for black it would be 0.0,0.0,0.0

Have a look at the ColorToRGB() function.

Quote:
also can i set a custom defined selection of colors
at design or runtime for the user to select ??

No.


Gambit



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.