(Blackberry 10) QML – Text Style

Buka file main.qml

 import bb.cascades 1.0

Page {
    content: Container {
        attachedObjects: [
            TextStyleDefinition {
                id: myStyle
                base: SystemDefaults.TextStyles.BodyText
                color: Color.Green
                fontWeight: FontWeight.Bold

        Label {
            text: "A label with some text."

            textStyle {
                base: myStyle.style
        TextArea {
            preferredWidth: 255
            text: "Cascades is awesome!"
        TextArea {
            text: "
                   p {font-style:italic;}
                   a:link {font-weight:bold;color:red}

This text uses an italic style.

This is a hyperlink.

" } // end of Container } }// end of Page

8-15-2013 5-22-22 AM


Published by


hello I am jarcode

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s