Re: How to get rid of constant color names for colordialog customcolors
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 24 Oct 2006 13:43:30 +0200
"HanslH" <no@xxxxx> wrote in message
news:ibtrj2hcirrulrhhoj5ricaoj0p1rvf846@xxxxxxxxxx
[...] The (almost) right formattting string was
Format('%8x', [tKleur])
But even then if I understand this text correctly
//======================================
Hexadecimal. The argument must be an integer value. The value is
converted to a string of hexadecimal digits. If the format string
contains a precision specifier, it indicates that the resulting string
must contain at least the specified number of digits; if the value has
fewer digits, the resulting string is left-padded with zeros.
//=======================================
the string should be left padded with zeros, but it isn't. ...
That's because your format string doesn't include a precision
specifier. If it did, it would look like '%8.8x' (the second eight
is the precision).
From a youth partially misspent programming C, I have the habitof writing '%08.8x' - the zero would indicate to printf() that I
desire zero-padding; then again, it would reject the '.8'.
Rgb codes, delphi color codes, color names, color constant names,
colors as longinteger,colors as rgb hex codes .. there should be a
faq about all this :-)
There are a few hurdles to getting your favourite source of confusion
into the miniFAQ. For instance, it must be Frequently Asked, and it
must not be too easy to find in the help file.
So, get yourself a half a dozen sock puppets...
Groetjes,
Maarten Wiltink (also Evil miniFAQ Boss)
.
- References:
- How to get rid of constant color names for colordialog customcolors
- From: HanslH
- Re: How to get rid of constant color names for colordialog customcolors
- From: alanglloyd@xxxxxxx
- Re: How to get rid of constant color names for colordialog customcolors
- From: HanslH
- How to get rid of constant color names for colordialog customcolors
- Prev by Date: Re: How to get rid of constant color names for colordialog customcolors
- Next by Date: Re: component renamer for D3
- Previous by thread: Re: How to get rid of constant color names for colordialog customcolors
- Index(es):
Relevant Pages
|