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: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi

Alert Dialog make buttons full width

When I make an AlertDialog with 3 buttons the top 2 are 50% width and the bottom 100%.

 

How can I make the dialog box button have 3 buttons with the same width?

 

_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Developer
Posts: 828
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Rogers

Re: Alert Dialog make buttons full width

[ Edited ]

if you're using a SystemDialog(), buttonAreaLimit might help.  for a custom dialog its essentially a container so you could align them using a stack layout

layout: StackLayout{
  orientation: LayoutOrientation.LeftToRight //or TopToBottom
}

 and then use space quota for each container 

 

Container {
   id: container1
   layoutProperties: StackLayoutProperties {
            spaceQuota: 1
        }
}
Container {
   id: container2
   layoutProperties: StackLayoutProperties {
            spaceQuota: 1
        }
}
Container {
   id: container3
   layoutProperties: StackLayoutProperties {
            spaceQuota: 1
        }
}