This project has moved and is read-only. For the latest updates, please go here.

how to change shape's text?

Feb 17, 2012 at 7:01 AM

dynamic monitor application ,how to chang shape‘s text?for example ,a box’s text .

Feb 17, 2012 at 7:59 AM
Edited Feb 17, 2012 at 7:59 AM
  • Cast the shape to a suitable class that has a text property, e.g. Box, RectangleBase or CaptionedShape:
    Box box = (Box)shape;
    box.Text = "New Text";
  • Use the ICaptionedShape interface that all shapes with text implement:
    ICaptionedShape captonedShape = (ICaptionedShape)shape;
    captionedShape.SetCaptionText(0, "New Text");

Best Regards,

Feb 18, 2012 at 4:59 AM