Profile Picture

Incomplite example TextShape ?

Posted By michal bandrowski 15 Years Ago
Author
Message
Pavel Vladov
Posted 15 Years Ago
View Quick Profile
Forum Member

Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)Forum Member (34 reputation)

Group: Forum Members
Last Active: 7 Years Ago
Posts: 33, Visits: 2

private void CreateWrappedText()

{

    // create text

    NTextShape text = new NTextShape("Wrapped text with font: Tahoma and size: 8", base.GetGridCell(0, 0));

    text.Style.TextStyle = new NTextStyle(new Font("Tahoma", 8), base.GetPredefinedColor(0));

    text.Mode = BoxTextMode.Wrap;

   

    // add to active layer

    document.ActiveLayer.AddChild(text);

    document.SmartRefreshAllViews();

}

 

private void CreateStretchedText()

{

    // create text

    NTextShape text = new NTextShape("Stretched text", base.GetGridCell(0, 1));

    text.Style.TextStyle = new NTextStyle(new Font("Tahoma", 8), base.GetPredefinedColor(1));

    text.Mode = BoxTextMode.Stretch;

   

    // add to active layer

    document.ActiveLayer.AddChild(text);

    document.SmartRefreshAllViews();

}

 

private void CreateWrappedTextWithBackplane()

{

    // create text

    NTextShape text = new NTextShape("Wrapped text with backplane", base.GetGridCell(1, 0));

    text.Style.TextStyle = new NTextStyle(new Font("Arial", 10), base.GetPredefinedColor(2));

    text.Style.TextStyle.BackplaneStyle.Visible = true;

    text.Style.TextStyle.BackplaneStyle.Shape = BackplaneShape.Ellipse;

    text.Mode = BoxTextMode.Wrap;

   

    // add to active layer

    document.ActiveLayer.AddChild(text);

    document.SmartRefreshAllViews();

}

 

private void CreateStretchedTextWithBackplane()

{

    // create text

    NTextShape text = new NTextShape("Stretched text with backplane", base.GetGridCell(1, 1));

    text.Style.TextStyle = new NTextStyle(new Font("Arial", 10), base.GetPredefinedColor(3));

    text.Style.TextStyle.BackplaneStyle.Visible = true;

    text.Style.TextStyle.BackplaneStyle.Shape = BackplaneShape.SmoothEdgeRectangle;

    text.Mode = BoxTextMode.Stretch;

   

    // add to active layer

    document.ActiveLayer.AddChild(text);

    document.SmartRefreshAllViews();

}

 

private void CreateXMLFormattedText()

{

    NRectangleF cell = base.GetGridCell(2, 0, 1, 1);

   

    // create text

    NTextShape text = new NTextShape(

        "<b>XML</b> Formatted Text allows you to <br></br>" +

        "<font face = 'Tahoma' size = '19'>mix</font> <font face = 'Impact' size = '22'>fonts</font> <br></br>" +

        "<font gradient = '0, 0, white, red'>display text with gradiens</font> <br></br>" +

        "<font size = '22' border = '1' bordercolor = 'gray'>display text with borders</font> <br></br>" +

        "<font shadowoffset = '2, 2' shadowfadelength = '3' shadowtype = 'gaussianblur'>display text with shadows</font> <br></br>" +

        "display text with <b>bold</b>, <i>italic</i>, <u>underline</u> and <strike>strikeout</strike>",

        cell);

   

    text.Style.TextStyle = new NTextStyle(new Font("Arial", 12), base.GetPredefinedColor(4));

    text.Style.TextStyle.TextFormat = TextFormat.XML;

   

    // add to active layer

    document.ActiveLayer.AddChild(text);

    document.SmartRefreshAllViews();

}



michal bandrowski
whistling Posted 15 Years Ago
View Quick Profile
Junior Member

Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)

Group: Forum Members
Last Active: 15 Years Ago
Posts: 10, Visits: 1
Hi,

In Menu Start - nevron vision 2009.1 - nevron ui - winform - exmaple - DOM - shapes - textshape ...
there is no body for methods ?

CreateWrappedText();
CreateStretchedText();
CreateWrappedTextWithBackplane();
CreateStretchedTextWithBackplane();
CreateXMLFormattedText();

Could you please post them here ?

regards,
Michal





Similar Topics


Reading This Topic