dialogPostRun 覆盖方法class Dialog 动态创建

public void dialogPostRun(DialogRunbase dialog)
{
    ;
    super(dialog);
    dialog.formRun().controlMethodOverload(true);
    dialog.formRun().controlMethodOverloadObject(this);

    ctlProdDate = dialog.formRun().design().controlName("ProdDate");
}

 

 

 

public Object dialog(DialogRunbase dialog, boolean forceOnClient)
{
    DialogRunbase dlg;
    ;

    dlg = super(dialog, forceOnClient);
    dlg.caption("BatchReport");
    ctlProdDate = dlg.addText(strfmt("以下多项输入字符数限制为500!","")).control();
    ctlProdDate.colorscheme(2);
    ctlProdDate.backGroundcolor(WinAPI::RGB2int(192,192,192));
    ctlProdDate.foreGroundcolor(WinAPI::RGB2int(0,0,255));

    dlgBatchId = dlg.addField(typeid(inventbatchid));
    dlgBatchId.fieldControl().replaceOnLookup(false);
    dlgBatchId.lookupButton(2);
    dlgBatchId.limitText(500);
    dlgBatchId.multiLine(true);
    dlgBatchId.displayLength(40);
    dlgBatchId.displayHeight(6);
    dlgBatchId.alignment(1);
    dlgBatchId.label("Batch Id");

    dlgItemId = dlg.addField(typeid(ItemId));
    dlgItemId.fieldControl().replaceOnLookup(false);
    dlgItemId.limitText(500);
    dlgItemId.multiLine(true);
    dlgItemId.displayLength(40);
    dlgItemId.displayHeight(6);
    dlgItemId.alignment(1);

    dlgProdId = dlg.addField(typeid(prodid));
    dlgProdId.fieldControl().replaceOnLookup(false);
    dlgProdId.limitText(500);
    dlgProdId.multiLine(true);
    dlgProdId.displayLength(40);
    dlgProdId.displayHeight(6);
    dlgProdId.alignment(1);
    dlgProdId.label("Prod Id");

    ctlProdDate     = dlg.addFieldValue(Types::String, prodDate, "@SYS54370").fieldControl();
    ctlProdDate.name("ProdDate");
    ctlProdDate.replaceOnLookup(false);
    ctlProdDate.lookupButton(2);
    ctlProdDate.width(264);

    return dlg;

}

posted @ 2011-12-22 09:21  perock  阅读(359)  评论(0编辑  收藏  举报