Align text to Top and round corners on rectangles

Started by qualitystreet, June 10, 2016, 07:52:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

qualitystreet

Hi All,

Any idea how I set the text alignment to top centered on a rectangle using c#?
I would also like to round the corners if possible.

I have tried             

visioRectShape.get_CellsSRC(
                (short)Visio.VisSectionIndices.visSectionObject,
                (short)Visio.VisRowIndices.visRowText,
                (short)Visio.VisCellIndices.visTxtBlkTopMargin);

but it does not do anything.

Thanks in advance.


JuneTheSecond

#1
I always use VBA.
In this case.


    visioRectShape.CellsSRC(visSectionObject, visRowText, visTxtBlkVerticalAlign).FormulaU = "0"  'Vertical Top
    visioRectShape.CellsSRC(visSectionParagraph, 0, visHorzAlign).FormulaU = "1"                  'Horizontal Center
    visioRectShape.CellsSRC(visSectionObject, visRowLine, visLineRounding).FormulaU = "30 pt"     'Round Corner

Best Regards,

Junichi Yoda
http://june.minibird.jp/

qualitystreet

Great thanks for the info. Gave me enough to be able to convert it into c#
FYI it looks like this


            visioRectShape.get_CellsSRC(
                    (short)Visio.VisSectionIndices.
                    visSectionObject,
                    (short)Visio.VisRowIndices.visRowText,
                    (short)Visio.VisCellIndices.visTxtBlkVerticalAlign).FormulaU = "0";
           
            visioRectShape.get_CellsSRC(
                    (short)Visio.VisSectionIndices.
                    visSectionObject,
                    (short)Visio.VisRowIndices.visRowLine,
                    (short)Visio.VisCellIndices.visLineRounding).FormulaU = "30 pt";