Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
xshadow
Posts: 66
Registered: ‎10-26-2008
My Device: Z10
Accepted Solution

TextField border color

Hello,

 

Is it possible to change standard TextField's border color? I would like to highlight it depending on the entered content. The same behavior has System Settings app, Add account page. See screenshots for details.

 

Thanks.

 

 

Developer
dishooom
Posts: 103
Registered: ‎12-31-2012
My Device: Blackberry 9810

Re: TextField border color

I had the same problm a few days back, and couldnt find any straight property to get it to work.

 

What i did instead was to hold the textField withina container and change the background color of the container. Be careful to set the focusHighlightEnabled: false  for the textField.

 

        Container {
            background: Color.Blue
            
             rightPadding: 2
             topPadding: 2
             bottomPadding: 2
             leftPadding: 2
                    
             preferredWidth: maxWidth
             preferredHeight: minHeight
                    
         TextField {
             text: qsTr("World")
             textStyle.base: SystemDefaults.TextStyles.BigText
       
             focusHighlightEnabled: false
        } 
        
    }

Hope this helps :Balloon: 

 

Thanks

-Dishooom

----------------------------------------------------------------------------------------------------------------------------------------------

 

Please mark this as solved if its fine.