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 question

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Joey
Guest





PostPosted: Tue Oct 11, 2005 3:10 pm    Post subject: TColorbox question Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics 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.