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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Developer
Posts: 104
Registered: ‎09-25-2013
My Device: BB 10
My Carrier: BB 10
Accepted Solution

Drop down alignment in BB 10 cascades

Here i am facing one problem,I need to change the Drop down option to align right.

now i am pushing the value like...

 

foreach (int key, map.keys()){
if(position ==1 && key >1000) {
    Option* option = Option::create();
    option->setText(map[key]);
    option->setValue(key);
    dropDown1->add(option);
    //dropDown1->setHorizontalAlignment(HorizontalAlignment::Right);
}else
    if(position ==2 && key < 1000) {
        Option* option = Option::create();
        option->setText(map[key]);
        option->setValue(key);
        dropDown1->add(option);
    }
}

 and my qml is like

 

 DropDown {
                   // title: "Select Symbol"
                    objectName: "myDropDown"
                    enabled: true

                    layoutProperties: StackLayoutProperties {
                        spaceQuota: 3.0
                    }

                    onSelectedOptionChanged: {
                    _addOrDelRef.getDropDownValue(selectedOption.value);
                        //labelOption.text= selectedOption.text;
                    }

 

if key is below 1000 align left otherwise align right.How to do that in bb 10 cascades...

Please help, Thanks...

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Drop down alignment in BB 10 cascades

[ Edited ]

Mixing alignment in dropdowns is not something I've tried.

 

Are you having trouble aligning the text right or working out how to do it at key 1000?


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Drop down alignment in BB 10 cascades

For the alignment I did a quick test and I don't think is possible the format of the option is pretty fixed.

I would suggest doing your own CustomPicker.

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
New Developer
Posts: 104
Registered: ‎09-25-2013
My Device: BB 10
My Carrier: BB 10

Re: Drop down alignment in BB 10 cascades

Thanks for your reply, but i have observed the drop down is aligning to right when Language settings are changed to Arabic.How is that posible?

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Drop down alignment in BB 10 cascades

That's because the underlying QML object library is being switched when the language changes. In effect it is using a different QML template.
Sure you may be able to hack it where you dynamically change the language as you hit 1000 but I wouldn't like to guarantee there won't be any glitches as likely all of the items will change.

If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Drop down alignment in BB 10 cascades

You can think about it in the same way as the static asset selector works for our apps but instead of switching the objects used based on theme or screen sizes it switches them based on language/localisation.

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
New Developer
Posts: 104
Registered: ‎09-25-2013
My Device: BB 10
My Carrier: BB 10

Re: Drop down alignment in BB 10 cascades

can you please give me a small example / link while QML object library is being switched when the language changes...

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Drop down alignment in BB 10 cascades

This is encoded in the BB10 OS and not available to us.

 

The closest thing we developers have akin to this is the static asset selector...

 

http://developer.blackberry.com/native/documentation/cascades/best_practices/resolution/using_static...

 

Currently language and localisation are not included in this.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Highlighted
New Developer
Posts: 104
Registered: ‎09-25-2013
My Device: BB 10
My Carrier: BB 10

Re: Drop down alignment in BB 10 cascades

Thanks Alot !!!

New Developer
Posts: 104
Registered: ‎09-25-2013
My Device: BB 10
My Carrier: BB 10

Re: Drop down alignment in BB 10 cascades

can you please post one example, how above Drop down code is converted into Custom piscker  through C++