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
Contributor
lichienmine
Posts: 36
Registered: ‎08-15-2013
My Device: Blackberry 10
Accepted Solution

Custom Dialog Box In QML

I want to make custom dialog with 3 button, i know c++ can do that, but i want make it in QML ? anybody know how to do it ?

Developer
Benecore
Posts: 540
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....

Re: Custom Dialog Box In QML

[ Edited ]

You can use buttons property

example:

SystemDialog {
    id: dialog
    title: "Title"
    body: "body body body body body body"
    buttons: [
        SystemUiButton {
            label: "One"
        },
        SystemUiButton {
            label: "Two"
                
        }
    ]
}

If you want to remove Cancel or Confirm buttons, just set label to empty (null) string.

 

You can look at samples app

https://developer.blackberry.com/native/sampleapps/ + Dialogs 

 

CustomDialogs

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



If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog
Developer
shahumang8
Posts: 671
Registered: ‎08-09-2010
My Device: Not Specified

Re: Custom Dialog Box In QML

Hi Lichienmine,

 

   You can also build customdialog class as per below

 

    

import bb.cascades 1.0

Dialog {
    id: dialogProgress

    Container {
        preferredWidth: 768
        preferredHeight: 1280
        background: Color.create(0.0, 0.0, 0.0, 0.5)

        layout: DockLayout {
        }

        Container {
            maxHeight: 397
            horizontalAlignment: HorizontalAlignment.Center
            verticalAlignment: VerticalAlignment.Center
            ActivityIndicator {
                preferredWidth: 200
                preferredHeight: 200
                running: true
            }
        }
    }
}

 

--------------------------------------------------------------------------------------------------------------------------------------------

feel free to press the like button on the right side to thank the user that helped you.

New Contributor
Everstar
Posts: 3
Registered: ‎11-18-2013
My Device: Z10

Re: Custom Dialog Box In QML

there's a sample of custom dialog with ios7 style in crackberry's theme section, you wont miss it