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
Regular Contributor
JohnQtQml
Posts: 55
Registered: ‎10-31-2012
My Device: Blackberry 10 Dev Alpha Simulator - VMware

how do get content in a titleBar, in the qml for blackberry cascades?

Hello, right now my app has a back button (it's an ImageButton with a left pointing arrow) in the main body,  that changes which container is visible (it has the effect of going back to the previous view).  But, I would like to put that button in the title bar.  I would also like to put my activitiy indicator into the titlebar, but I can't find information on how to do this.  Does anybody know how to do this?

Please use plain text.
Developer
YamilBracho
Posts: 713
Registered: ‎05-31-2010
My Device: 8520

Re: how do get content in a titleBar, in the qml for blackberry cascades?

Set  kind: TitleBarKind.FreeForm and you can add a custom Container to your TitleBar. Please check https://developer.blackberry.com/cascades/reference/bb__cascades__titlebar.html

Please use plain text.
Developer
kamalakshan
Posts: 107
Registered: ‎06-12-2012
My Device: Dev Alpha C, Playbook

Re: how do get content in a titleBar, in the qml for blackberry cascades?

However, putting back button on the title bar will not be advised as per BB10 UI guidelines.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
Please use plain text.
Regular Contributor
JohnQtQml
Posts: 55
Registered: ‎10-31-2012
My Device: Blackberry 10 Dev Alpha Simulator - VMware

Re: how do get content in a titleBar, in the qml for blackberry cascades?

The only options for TitleBarKind seem to be TitleBarKind.Default & TitleBarKind.Segmented.

 

TItleBarKind.FreeForm gives an error - and if you move the mouse over the error, it says,

 

"Unkown Symbol 'FreeForm'.  We have 1 suggestion Add to whitelist.'

 

I think maybe I need an import statement for this - I have tried

 

import bb.cascades.TitleBarKind 1.0 and

import bb.cascades.titlebarkind 1.0, neither of those work. 

 

Do I need an import statement to fix this?  If not, how do I fix it?  If so, what is the proper import statement?

Please use plain text.
Regular Contributor
JohnQtQml
Posts: 55
Registered: ‎10-31-2012
My Device: Blackberry 10 Dev Alpha Simulator - VMware

Re: how do get content in a titleBar, in the qml for blackberry cascades?

kindProperties inside of my

 

titleBar: TitleBar {

...

}

 

is also giving an error, and when I hover the mouse over it - it says, "Invalid property"

Please use plain text.
Developer
YamilBracho
Posts: 713
Registered: ‎05-31-2010
My Device: 8520

Re: how do get content in a titleBar, in the qml for blackberry cascades?

Do you forgot semicolon ? I mean 

kindProperties inside of my
 
Page {
  titleBar: TitleBar {
    kind: TitleBarKind.FreeForm
    kindProperties: FreeFormTitleBarKindProperties {
      ...
     }
   }
   ...
}

 

Please use plain text.
Regular Contributor
JohnQtQml
Posts: 55
Registered: ‎10-31-2012
My Device: Blackberry 10 Dev Alpha Simulator - VMware

Re: how do get content in a titleBar, in the qml for blackberry cascades?

Where does the semicolon go?

Please use plain text.
Regular Contributor
JohnQtQml
Posts: 55
Registered: ‎10-31-2012
My Device: Blackberry 10 Dev Alpha Simulator - VMware

Re: how do get content in a titleBar, in the qml for blackberry cascades?

I don't think I forgot a semicolon.

Please use plain text.
Developer
YamilBracho
Posts: 713
Registered: ‎05-31-2010
My Device: 8520

Re: how do get content in a titleBar, in the qml for blackberry cascades?

Oh, yes, I saw it, sorry...

Do you set a the first of your qml file "import bb.cascades 1.0"

Show us more code from your qml...

Please use plain text.
Regular Contributor
JohnQtQml
Posts: 55
Registered: ‎10-31-2012
My Device: Blackberry 10 Dev Alpha Simulator - VMware

Re: how do get content in a titleBar, in the qml for blackberry cascades?

Actually, it works for Blackberry Native SDK 10.1.0.1020.  My problem is it won't let me use that SDK version on the blackberry device I'm using.  It will only let me use SDK 10.0.9.2372, and it turns out that TitleBarKind.FreeForm and kindProperties only work in SDK 10.1, and not SDK 10.0.

Please use plain text.