1

After the latest office update, I have found that 3 edit boxes that used to fit perfectly in the Ribbon on top of each other, no longer fit, and excel inserts an empty space instead of the third one, and pushes the third one to the next column.

Here is a print screen of what happens: Edit box pushed to the next column Here is my ribbon XML part:

<customUI  xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="MyAddInInitialize">
    <ribbon >
        <tabs >     
            <tab id="tabIqvia" getLabel="onGetLabel" getVisible="GetVisible"     >   
                <group id="grpInfo" getLabel="onGetLabel"   getVisible="GetVisible" getImage = "onGetImage" getSupertip="onGetSupertip" >
                    <editBox id="edbInfo1" getLabel="onGetLabel"    getText="onGetText" sizeString="FALSE"      getEnabled = "onGetEnabled"
                            getScreentip="onGetScreentip"   getSupertip="onGetSupertip" />
                    <editBox id="edbInfo2" getLabel="onGetLabel"    getText="onGetText" sizeString="FALSE"      getEnabled = "onGetEnabled"
                            getScreentip="onGetScreentip"   getSupertip="onGetSupertip" />
                    <editBox id="edbInfo3" getLabel="onGetLabel"    getText="onGetText" sizeString="FALSE"      getEnabled = "onGetEnabled"
                            getScreentip="onGetScreentip"   getSupertip="onGetSupertip" />      
                    <separator id="sepInfo3" />
                </group>
            </tab>
        </tabs>
    </ribbon>
</customUI>

Anyone else having this issue?

Dumitru Daniel
  • 571
  • 4
  • 19
  • Could you post full XML? Seems you cut something out (for instance, no `labelControl`s). – JohnyL Dec 06 '18 at 18:34
  • I will post more of the XML code in about 1 hour, but i can't post it all, it's huge, but just to give you an idea, the edit box has 2 parts for the same control, the label is built in, and it also contains an input box, or text input. I did not use "box" control to group them horizontally or vertically, so i thinking it might be an actual Excel bug. – Dumitru Daniel Dec 07 '18 at 07:58
  • OK. Post the piece of XML responsible for rendering these edit boxes. – JohnyL Dec 07 '18 at 08:28

3 Answers3

0

I think I found the answer, and it it so stupid, you would not believe it. You know how Windows has that "Change the size of text, apps and other items?". Set that to 125% and your buttons will no longer fit on Windows 7. I really do hope they fixed this on Windows 10, because it's just crazy stupid that the testers missed that one.

Dumitru Daniel
  • 571
  • 4
  • 19
0

Having recently dealt with HDPI rendering on WinForms, I did also by chance figure out what was going on with the Ribbon: it fits 3 text boxes when displayed under a scaling of 96 DPI / 100% scaling. Under resolution scaling settings at 125% and above, the ribbon fits only two text boxes.

On your own answer you mention the OS version. This has nothing to do with the OS itself: the OS only provides to the application the environment settings, such as the DPI scaling of each screen.

It is about (i) how the application itself decides to behave according to the environment settings (the so called DPI modes such as DPI unaware, System Aware, or Aware Per Monitor), and (ii) how the ribbon form redraws under high DPI environments.

In fact, I now design my winforms from a Surface 4 Pro (HDPI screen / 200% scaling / Windows 10) which I set to 100% scaling. I also set the resolution to 1920x1200 otherwise it becomes unmanageable. This is to preserve consistency with old forms, forms designed by colleagues on low DPI machines, and recommendations. Note the resolution does not change the behaviour, only the scaling does.

Some interesting reading:

Ama
  • 1,373
  • 10
  • 24
-1

I have the exact same behaviour and it seems to have to deal with either the Office version or the Windows version you are using.

I have 3 editboxes of same length grouped in a box item. (see full Ribbon XML code below)

This is a Word Add-In with the xml file emdeded in a .dotm file. I tested it on two separate machines:

Machine A

OS: Windows 7, MS Office version: 365, Word version: "1811 (Build 11029.20108 Click-to-Run)"

Ribbon on Machine A shows nicely

Machine B

OS: Windows 10, MS Office version: 365, Word version: "1811 (Build 11029.20079 Microsoft Store)"

Ribbon on Machine B shows the third textbox aside

XML Code:

<ribbon>
<tabs>
<tab id="tab_myMacro" label="myMacro" insertAfterMso="TabHome">

    <group id="group_myMacro_Dates" label="Date Calculations" imageMso="DateAndTimeInsert">
        <box id="box_myMacro_Dates_Toogles" boxStyle="vertical">
            <toggleButton id="toogleButton_myMacro_Dates_CalculateStart" label="Calculate Start" showLabel="false" imageMso="CDAudioStartTime" onAction="ribDatesCalculateStart"/>
            <toggleButton id="toogleButton_myMacro_Dates_CalculateFinish" label="Calculate Finish" showLabel="false" imageMso="CDAudioStopTime" onAction="ribDatesCalculateStart"/>
            <toggleButton id="toogleButton_myMacro_Dates_CalculateDuration" label="Calculate Duration" showLabel="false" imageMso="StartAfterPrevious" onAction="ribDatesCalculateStart"/>
        </box>
        <box id="box_myMacro_Dates_Labels" boxStyle="vertical">
            <labelControl id="labelControl_myMacro_Dates_CalculateStart" label=" Start:"/>
            <labelControl id="labelControl_myMacro_Dates_CalculateFinish" label=" Finish:"/>
            <labelControl id="labelControl_myMacro_Dates_CalculateDuration" label=" F-S+1 ="/>
        </box>
        <box id="box_myMacro_Dates_Editboxes" boxStyle="vertical">
            <editBox id="editbox_myMacro_Dates_Start" showLabel="false" showImage="false" sizeString="_01_Jan_2010_" onChange="ribDatesStartChanged"/>
            <editBox id="editbox_myMacro_Dates_Finish" showLabel="false" showImage="false" sizeString="_01_Jan_2010_" onChange="ribDatesFinishChanged"/>
            <editBox id="editbox_myMacro_Dates_Duration" showLabel="false" showImage="false" sizeString="_01_Jan_2010_" onChange="ribDatesDurationChanged"/>
        </box>
        <box id="box_myMacro_Dates_DatePopUps" boxStyle="vertical">
            <button id="labelControl_myMacro_Dates_StartPopUp" showLabel="false" showImage="true" imageMso="DateAndTimeInsert"/>
            <button id="labelControl_myMacro_Dates_FinishPopUp" showLabel="false" showImage="true" imageMso="DateAndTimeInsert"/>
        </box>
    </group>

</tab>
</tabs>
</ribbon>
</customUI>
Ama
  • 1,373
  • 10
  • 24