2010-12-07 62 views

回答

21
static void DialogSampleCode(Args _args) 
{ 
    Dialog  dialog; 
    DialogField field; 
    ; 
    dialog = new Dialog("My Dialog"); 
    dialog.addText("Select your favorite customer:"); 
    field = dialog.addField(typeid(CustAccount)); 

    dialog.run(); 
    if (dialog.closedOk()) 
    { 
     info(field.value()); 
    } 
} 
+9

`field = dialog.addField(extendedTypeStr(CustAccount)); // AX 2012` – 2013-11-22 07:48:32

16

的非常簡單的對話框,使用Box Class

Box::info("your message"); 

Box::warning("your message"); 

if (Box::okCancel("continue?", DialogButton::Cancel) == DialogButton::Ok) 
    { 
     // pressed OK 
     ... 

或其他靜態方法之一(infoOnceyesNo,yesNoCancel,yesAllNoAllCancel,...)

相關問題