Border.RadiusEnabled

Syntax

RadiusEnabled: Boolean

Description

The RadiusEnabled property sets and returns whether rounded border is active.

Comments

Available Values:

Example

To execute the example, the HTML page must contain links to the jquery.js, PP.js scenario files, and the PP.css styles file. Add a text area to the document and set new style for this area:

// Create a text area
var textArea = new PP.Ui.TextArea({
    // Set area width
    Width: 200,
    // Set area height
    Height: 100,
    // Set area contents
    Content: "2013"
});
// Create a shadow
var shadow = new PP.Shadow({
    Color: new PP.Color("#ffef99")
});
//Set shadow angle
shadow.setAngle(45);
// Set difference in shadow size relative to object
shadow.setSize(10);
// Create a text area border
var border = new PP.Border({
    "Width": 2
});
// Set border activeness
border.setEnabled(True);
// Set rounding radius
border.setRadius(10);
// Set border style
border.setStyle(PP.BorderStyle.dashed);
// Set border color
border.setColor(new PP.Color("#933da8"));
// Set rounding activeness
border.setRadiusEnabled(True);
// Create a text area style
var style = {
    Release: new PP.Style({
        // Set a solid fill brush
        Background: new PP.SolidColorBrush({
            Color: "#a3c8fc"
        }),
        // Set bold italic font style
        Font: new PP.Font({
            IsBold: True,
            IsItalic: True
        }),
        // Set border
        Border: border,
        // Set shadow
        Shadow: shadow
    })
};
// Set style
textArea.setStyle(style);
// Add this area to document
textArea.addToNode(document.body);

After executing the example a text area with bold italic font style, shadow and fill color is created in the document. A dashed line 2 pixels wide with angle rounding radius 10 pixels is set for text area border:

Then make border roundings inactive, set new values of style and color for each border line and refresh text area style:

// Set rounding activeness
border.setRadiusEnabled(False);
// Set bottom border color
border.setBottomColor(new PP.Color("#808080"));
// Set left border color
border.setLeftColor(new PP.Color("#0000ff"));
// Set right border color
border.setRightColor(new PP.Color("#0000ff"));
// Set top border color
border.setTopColor(new PP.Color("#808080"));
// Set bottom border style
border.setBottomStyle(PP.BorderStyle.dashed);
// Set left border style
border.setLeftStyle(PP.BorderStyle.solid);
// Set right border style
border.setRightStyle(PP.BorderStyle.solid);
// Set top border style
border.setTopStyle(PP.BorderStyle.dashed);
// Refresh text area style
textArea.setStyle(style);

As a result the changed style is applied to text area, in which a new value of border rounding activeness is set, and also new values of color and style for each border line. Text area border roundings are removed. Solid line style is set for the left and the right area borders, dashed line style is set for the top and the bottom area borders:

See also:

Border