Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>import net.rim.device.api.system.Bitmap; import net.rim.device.api.ui.component.CheckboxField; import net.rim.device.api.ui.component.Dialog; import net.rim.device.api.ui.container.DialogFieldManager; public class CheckboxInputDialog extends Dialog{ private CheckboxField checkboxEditField; public CheckboxInputDialog(String choices[],int values[], String label){ super(label, choices,values,Dialog.OK, Bitmap.getPredefinedBitmap(Bitmap.INFORMATION), Dialog.GLOBAL_STATUS); checkboxEditField = new CheckboxField("Lablel",false); net.rim.device.api.ui.Manager delegate = getDelegate(); if( delegate instanceof DialogFieldManager){ DialogFieldManager dfm = (DialogFieldManager)delegate; net.rim.device.api.ui.Manager manager =dfm.getCustomManager(); if( manager != null ){ manager.insert(checkboxEditField, 0); } } } } </code></pre> <p>Now Call this dialog at following way...</p> <pre><code> String choices[] = { "OK", "CANCEL" }; int values[] = { Dialog.OK, Dialog.CANCEL }; CheckboxInputDialog d = new CheckboxInputDialog(choices,values,"Dialog Label"); d.show(); </code></pre> <p>Output will Be:</p> <p><img src="https://i.stack.imgur.com/hngkZ.png" alt="enter image description here"></p> <p>Get Event of OK and Cancel Button.</p> <pre><code>String choices[] = { "OK", "CANCEL" }; int values[] = { Dialog.OK, Dialog.CANCEL }; final CheckboxInputDialog d = new CheckboxInputDialog(choices, values,"Dialog Label"); UiApplication.getUiApplication().invokeLater(new Runnable() { public void run() { int iResponse = d.doModal(); if (iResponse == 0) { System.out.println("Press Ok"); }else{ System.out.println("Press Cancel"); } } }); </code></pre> <p>Hope Help full..</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload