Extending TfrxStretcheable: how to use InitPart and Drawpart
Hi,
I'm writing a custom report component that extends TfrxStretcheable. According to the developer manual i should override CalcHeight, InitPart and DrawPart. so far i've overridden CalcHeight and that works fine: the component now stretches properly based on the size of the data that are placed in the component. However, i'm a bit puzzled about the use of InitPart and DrawPart. How should they behave and how are they called? I've done some tests and the engine does not seem to call these methods directly.
The only example i could find of the use of these methods is in the Class TfrxCustomMemo, but this class is very complicated and beyond my level of understanding. So my question is: can anyone give me some hints on how InitPart and DrawPart are (or should be) called and what their responsibilites are?
Thanks for any tip!
Gertjan (Repelsteel)
I'm writing a custom report component that extends TfrxStretcheable. According to the developer manual i should override CalcHeight, InitPart and DrawPart. so far i've overridden CalcHeight and that works fine: the component now stretches properly based on the size of the data that are placed in the component. However, i'm a bit puzzled about the use of InitPart and DrawPart. How should they behave and how are they called? I've done some tests and the engine does not seem to call these methods directly.
The only example i could find of the use of these methods is in the Class TfrxCustomMemo, but this class is very complicated and beyond my level of understanding. So my question is: can anyone give me some hints on how InitPart and DrawPart are (or should be) called and what their responsibilites are?
Thanks for any tip!
Gertjan (Repelsteel)