 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Joey Guest
|
Posted: Tue Oct 11, 2005 3:10 pm Post subject: TColorbox question |
|
|
Hi all
I have derived from TCustomColorBox a simple component (just overriding
DrawItem) and it works fine
now, as i'd like to have the "custom color" (that is the 1st item when
combo Style contains cbCustomColor) different from the default clBlack
(choosen by the TCustomColorBox.PopulateList) i have tried:
Items.Objects[0] := TObject(clRed); // clRed just to select an initial
custom color <> clBlack
both in the Create, CreateWnd and Loaded procedures but while the first of
them shows a "parent not created" error the other two ones (CreateWnd and
Loaded) don't produce the wished result.
If I put the above code line inside a simple Test form create event (of
course with reference to a TMyColorBox object) it works fine but if
possible i'd like to incorporate this feature directly inside the component
source.
Thanks in advance for any suggestion/help about the above
|
|
| 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
|
|