3

Can anybody point to some (thick) books (even web sites) that explain how to create your own composite controls (for example a TPanel that is the parent for several other controls) in all its glory?

I mean something beyond Borland's "Component Writers Guide".

I have seen here on StackOverflow LOTS of posts about this topic and in every single one of them people are contradicting about the constructors, inheritance, where/when to initialize code, streaming issues, order of events, parenting, etc

Gabriel
  • 20,797
  • 27
  • 159
  • 293
  • Danny Thorpe's Delphi Component Design is probably your best bet. There's also Marco's big book. – David Heffernan Sep 13 '12 at 16:28
  • Thanks David. I was not aware about Danny Thorpe's book. – Gabriel Sep 13 '12 at 16:42
  • 2
    Ray Konopka of [Raize Software](http://www.raize.com) still sells his component writing book in PDF format as well. It's a little hard to find - it's on the [Pricing Page](http://www.raize.com/DevTools/Ordering/Pricing.asp). Even though it's titled `Developing Custom Delphi 3 Components`, it's still pretty useful now, and was at one time **the** Delphi component reference. – Ken White Sep 13 '12 at 18:32
  • 1
    Borland Moscow designed automatic solution for it - Custom Containers Pack. Pity it was only supported until Delphi 5. TFrame seems to be distant step-child from it but without even a trace of encapsulation CCP had. Dunno if you can port it to XE though. But in D4/D5 times that was exactly this, u make TPanel or TForm with components and code, then i click one magic button and you had you new component installed into Palette. – Arioch 'The Sep 14 '12 at 08:36
  • This sounds similar to what I wanted a while: http://stackoverflow.com/questions/9479872/component-creation-joining-components-together As Uwe showed in the answer `SetSubComponent` was the magic keyword to joining them. The only thing I didn't like about `SetSubComponent` is tools like WinSpy++ do not see the control as one single control, but as childs etc. –  Sep 14 '12 at 09:15
  • Hi Blobby - Actually I need to know something else. For example Uwe sets the 'parent' like this 'FImage.Parent:= Self' while others are against it. – Gabriel Sep 27 '12 at 12:38
  • I have found that there is a sourceforge repository of the CCPack. I could install it on Delphi XE2 after a little change. Check here http://sourceforge.net/projects/ccpack/ – Eduardo Elias Dec 16 '13 at 11:09
  • @eelias - You should post this as an answer. I will accept it. Is not EXACTLY what I asked for (documentation) but it seems it is as good as that (or even better). – Gabriel Dec 17 '13 at 14:13

2 Answers2

2

I have found that there is a sourceforge repository for the CCPack.

There is even the packages for many delphi versions.

I have installed on Delphi XE2 and it was needed a simple fix for working (the registering call is not right, it gives a compile time error, i dont remember exactly, but easy correction)

I could install and works as expected. I have made several simple components and a composite one using it and worked.

CCPack on SourceForge

Eduardo Elias
  • 1,742
  • 1
  • 22
  • 49
  • Ok, it has been nearly a year since you posted this, but for what it's worth: I have just fixed that problem and added packages for Delphi up to XE7. – dummzeuch Sep 14 '14 at 11:31