Home Component Writing
New Blog Posts: Merging Reports - Part 1 and Part 2

Shape with text

edited August 2002 in Component Writing
Hi,
I'm looking for a shape (rounded rectangle) with a caption-property
(horizontal centered)
We would use it as a column-header (at the moment we do it with a shape and
a label-component but this takes to much time to arrange).

Has anybody done this. Has anybody a similar example (beside of the
coustomcheckbox-example)?
It don't has to be data-aware.
It would be great if one could insert the caption within the
designer-toolbar like it works with an ordinary label.

Thank you,
Josef Gschwendtner

Comments

  • edited August 2002
    You could create and register a custom label descendent. In the
    PropertiesToDrawCommand method, override it and create a TppShape rounded
    rectangle draw command and assign its page property. This page object can
    be pulled from the inherited draw command that is created for the label
    (TppDrawText). By assigning hte page property, you will tell the draw shape
    command to be located on the same page as the draw text. Remember to set
    the positional proeprties of the draw shape to be the same as the draw
    text..


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.