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: 206
Registered: ‎05-15-2012
My Device: None
My Carrier: Telus

Center a SystemDialog

Is there any way to accomplish this? The system dialog does not appear to be centered by default. It doesn't have alignment properties either, so it can't be set. I can't think of any convenient way to get an attachedObject inside of a container, either. I really don't want to have to build a custom dialog.

 

Here's the current QML for the dialog in question:

 

attachedObjects: [
		                	         SystemDialog {
							            id: dialog
							            objectName: "diceDialog"
							            title: qsTr("Dice Roll")
							            confirmButton.label: qsTr("Dismiss")
							            confirmButton.enabled: true
							            cancelButton.label: undefined
					        }
]

 

----------------------
Check out my app, Alien Flow for reddit

And of course, like my post if you found it helpful or informative!
Contributor
Posts: 20
Registered: ‎02-21-2012
My Device: Bold 9900
My Carrier: AT&T

Re: Center a SystemDialog

I don't believe that you can. Two reasons: SystemDialog is its own object.

What you can do is create a CustomDialog:

https://developer.blackberry.com/cascades/documentation/ui/dialogs_toasts/custdialogs.html