web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Auto resize the dialog

(0) ShareShare
ReportReport
Posted on by 916

I have a created a class inherited from RunBaseBatch class with the dialog as displayed below. i want to auto resize width and height.

4274.Capture.PNG

public Object dialog()

{
DialogRunbase dialog = super();
#resAppl
;
//dialog.formRun().lock();
dialog.addGroup("@SYS1046");
fromDateField = dialog.addFieldValue(extendedTypeStr(FromDate),fromDate);
toDateField = dialog.addFieldValue(extendedTypeStr(Todate),toDate);

//Multi-Select
dialogGrp = dialog.addGroup("@SYS129100");
formBuildControl = dialog.formBuildDesign().control(dialogGrp.name());
formBuildStringControl = formBuildControl.addControl(FormControlType::String, "@SYS72683");
formBuildStringControl.label("@SYS72683");

dialogFilePath = dialog.addFieldValue(extendedTypeStr(FilePath), filePath, "@SYS319541");

//dialog.formRun().resetSize();
//dialog.formBuildDesign().windowResize(true);
//dialog.formRun().unLock();
return dialog;
}

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at
    RE: Auto resize the dialog

    You can achieve with the help of dialogGroup in the dialog method.

    Sample code:

     dialogGroup = dialog.addGroup("Main");

     dialogGroup.columns(2);

    // Include your dialog fields and they gets auto-aligned.

    Thanks

  • Suggested answer
    reachnaidu Profile Picture
    890 on at
    RE: Auto resize the dialog

    You need to reduce the height  of the TabPage to some height which is acceptable to you. The Tab can stay with column width and height . When you reduce  the Tabpage height , the below group auto align to right

    Thanks

  • ALAhmed Profile Picture
    916 on at
    RE: Auto resize the dialog

    what if i want position two date in left and others control on right

  • Chaitanya Golla Profile Picture
    17,225 on at
    RE: Auto resize the dialog

    Hi,

    Are you trying to resize the dialog or the selected control.

    To resize dialog use the below code in the method dialog:

    dialog.formBuildDesign().height(<Integer>);
    dialog.formBuildDesign().width(<Integer>);

    return dialog;

    To resize control use the below code in the method dialog:

    dlgCustAccount.heightMode(<Integer>);
    dlgCustAccount.widthMode(<Integer>);

    return dialog;

    Based on the filepath value you can decide the integer value. Hope this helps you:-)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans