tizbn
tizbn

Reputation: 1907

How to create dialog using designer?

How can create dialog using the UI Designer? I have try to make dialog by creating new Form and change its UIID to dialog and showForm("dialogName", null); it shows form with full screen

And again I use following statement Dialog dlg = (Dialog)createContainer(fetchResourceFile(), "dialogName"); but it shows the following error com.codename1.ui.Form cannot be cast to com.codename1.ui.Dialog

How can solve this problem and how can i create dialog in ui designer?

Thank dear shai I am able to create dialog on the designer.Again i have one question . I try to add Back command on the dialog but the command is not displayed and i also refer the following link

Codenameone - change dialog commands appearance

But i did not find dlgButtonCommandUIID in the theme constants tab , how can i solve it and how can i add back button in dialog.

Plus is there default Positive(YES)button and negative(NO) button in dialog? If yes how to implement it?

Upvotes: 0

Views: 116

Answers (1)

Shai Almog
Shai Almog

Reputation: 52760

When you press the Add option in the designer there is an option to create a form or many other templates in the designer. One of the options is Dialog.

Setting the UIID just makes the form look like a dialog in some UI's (the Dialog styling is pretty complex).

Upvotes: 1

Related Questions