How can I create a new RCL to get a thinner line rectangle?
Hi,with your directions I make a RCL descends from TppLine.I override the
PaintDesignControl to show rectangle in the design page.It works all
right.But I do not know how to override PropertiesToDrawCommand methods get
right preview,shall I still use TppDrawLine as the draw command or create
new one? I wish able to receive a detailed description.
I am very glad that at this place I have received timely and useful
directions.
Thanks a lot.
Peter
PaintDesignControl to show rectangle in the design page.It works all
right.But I do not know how to override PropertiesToDrawCommand methods get
right preview,shall I still use TppDrawLine as the draw command or create
new one? I wish able to receive a detailed description.
I am very glad that at this place I have received timely and useful
directions.
Thanks a lot.
Peter
This discussion has been closed.
Comments
You will need to create a new DrawCommand, however the TppDrawLine object
contains the Weight property which allows you to define any line thickness
you would like as a Single number type.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
how can I realize the function, by override draw method of TppDrawCommand?
Can you give me some advice?
Thanks,
Peter
Each draw command simply contains all the values needed to draw a component
accurately on a specific device canvas. Most of the components in
ReportBuilder are drawn to the device canvas in their respective device
classes (TppScreenDevice, TppPrinterDevice, etc.). If you are creating your
own DrawCommand, you will need to override the Draw function in the
TppDrawCommand class and define how you would like your object to look on
screen and on paper in this function.
An example of the first method is the TppLine component. Once the
TppDrawLine drawcommand is instructed to Draw (by the TppDevice), the
TppDrawCommand class will call Device.Draw, which will in turn call the
DrawLine method of the Printer or Screen device.
An example of the second method (which you will need to use) is the
TppRichText component. If you take a look at the TppDrawRichText class
inside the ppDrwCmd.pas file, you will see that the Draw function is
overridden and inside this method is instruction for printing the richtext
to the screen and printer based on the drawcommand properties. Another
example of this method would be the Bar Code component. Hope this helps,
let me know if you have any more questions about how this works.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com