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

Posts: 20
Registered: ‎02-21-2012
My Device: Bold 9900
My Carrier: AT&T

Active Frame Header + Text Size

[ Edited ]

I'm trying to stick to the UI Guideliness, but I can't, for the life of me, find how to make a header exactly 62.0 pixels high and the font 40.0 pixels tall.




Had a bit of an ingenius moment after asking the question.


import bb.cascades 1.0

Container {
    background: backgroundPaint.imagePaint
    attachedObjects: [
        ImagePaintDefinition {
            id: backgroundPaint
            imageSource: "asset:///images/********_appcover.png"
            repeatPattern: RepeatPattern.XY
    Container {
        minWidth: 334.0
        minHeight: 62.0
        background: Color.Black
        layout: StackLayout {
            orientation: LayoutOrientation.LeftToRight
        horizontalAlignment: HorizontalAlignment.Center
        verticalAlignment: VerticalAlignment.Center
        opacity: 0.80
        bottomPadding: 7.0
        leftPadding: 7.0
        Label {
            text: "TEST!"
            verticalAlignment: VerticalAlignment.Center
            textStyle.color: Color.White
            textStyle.textAlign: TextAlign.Center
            textStyle.fontSize: FontSize.PointValue
            maxHeight: 40.0
            textStyle.fontSizeValue: 8.0

 Apparently the height/width is in pixels, and a size 8.0 font corresponds to "roughly" 40.0 pixels.