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
Posts: 146
Registered: ‎07-03-2013
My Device: BB 9360
My Carrier: WIND

Padding/margins Labels in Dynamic Active Frames

Hello, 
I was just wondering, can we have 0 margins/padding for the labels in the dynamic active frame window. I have about 5 labels and pushing all the labels in the container.

 

the following is the snippet of the code:

    Container *root = new Container();

    root->setBackground(Color::LightGray);
    m_theLabel = new Label();
    m_theLabel_one = Label::create().text("");
    m_theLabel_two = Label::create().text("");
    m_theLabel_three = Label::create().text("");
    m_theLabel_four = Label::create().text("");
    m_theLabel_five = Label::create().text("");

    root->add(m_theLabel);
    root->add(m_theLabel_one);
    root->add(m_theLabel_two);
    root->add(m_theLabel_three);
    root->add(m_theLabel_four);
    root->add(m_theLabel_five);

    setContent(root);

 

I want to have almost 0 padding/margins between the labels in the container.

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

Re: Padding/margins Labels in Dynamic Active Frames

Padding for labels is undefined you will get a runtime warning if you try to use them.


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: 146
Registered: ‎07-03-2013
My Device: BB 9360
My Carrier: WIND

Re: Padding/margins Labels in Dynamic Active Frames

Oh yeah, I forgot about that.
But is it possible to define the margins for tables or padding for the container.
I don't see any option for padding/margins even for the containers.
Am I not importing any package that could be causing it?
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Padding/margins Labels in Dynamic Active Frames

Containers are one of the controls that can take padding.

Apologies if this is too basic, however all UI control elements are derived from the Control class and it's this class that has the padding and margin properties...

http://developer.blackberry.com/native/reference/cascades/bb__cascades__control.html

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.