 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
peted@iinet.net.au Guest
|
Posted: Mon Jun 21, 2004 10:10 am Post subject: TColorbox returning colors as RGB values ?? |
|
|
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
|
Posted: Mon Jun 21, 2004 10:36 am Post subject: Re: TColorbox returning colors as RGB values ?? |
|
|
[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
|
Posted: Mon Jun 21, 2004 11:31 am Post subject: Re: TColorbox returning colors as RGB values ?? |
|
|
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
|
Posted: Mon Jun 21, 2004 5:57 pm Post subject: Re: TColorbox returning colors as RGB values ?? |
|
|
<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 |
|
 |
|
|
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
|
|