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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Form string control mo...
Finance forum

Form string control modify height & width

(0) ShareShare
ReportReport
Posted on by 629

In D365 new form pattern, how can I specify one string control to specific height and width ?

For example in a tab page, I would like the control to take up the whole length of the display webpage. 

  • Suggested answer
    Martin Dráb Profile Picture
    241,417 Most Valuable Professional on at

    You shouldn't do that; you should leave it to the responsive design. In your case, consider the Fill Text sub-pattern.

    Also, look at Form styles and patterns > Frequently asked questions in D365FO documentation. There is one for Why can't I change WidthMode on fields in the Fields and Field Groups subpattern?

  • tyhj Profile Picture
    629 on at

    I know I shouldn't. But there is always some weird request that want to customize the look and feel.

    I am trying to change to custom pattern and try each properties in turn to see which one work. This is really a tedious job.

  • Verified answer
    Eugen Glasow Profile Picture
    6,365 on at

    If you are talking extensions, no property is going to work, but a code like this:

    It must be slow, but it works.

        [FormControlEventHandler(formControlStr(JmgRegistrationTouch, JobButtons), FormControlEventType::PageActivated)]
        public static void JobButtons_OnPageActivated(FormControl _sender, FormControlEventArgs _e)
        {
            FormControl                 formControl;
            FormFunctionButtonControl   bundleButton;
            FormTabPageControl          jobButtonsTab = _sender as FormTabPageControl;
            int i;
            
            for (i = jobButtonsTab.controlCount(); i >= 1; i--)
            {
                formControl = jobButtonsTab.controlNum(i);
                if (formControl.type() != FormControlType::MenuFunctionButton)
                {
                    continue;
                }
                bundleButton = formControl as FormFunctionButtonControl;
                /// Look for your control on the tab page
                if (strScan(bundleButton.name(), 'THISISYOURCONTROLNAME', 1, 100))
                {
                    bundleButton.width(120);
                    bundleButton.height(60);
                }
            }
    
        }


  • tyhj Profile Picture
    629 on at

    Height does not seem to work when set in extension. 

  • Suggested answer
    tyhj Profile Picture
    629 on at

    Height does not work, need to set DisplayHeight

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans