Search code examples
c++comboboxmfcribbonspacing

Ribbon Combobox Spacing and Alignment


I have two comboboxes, one beneath the other, on my ribbon with different lengths of texts. This makes the spacing uneven and I would like to correct that and hopefully allow more space between the two as well. Are there any easy ways to this or is it a limitation of MFC?

Current situation:

Current

Ideal situation:

Ideal


Solution

  • enter image description here

    I was able to accomplish what you want by setting two properties for the panel:

    • Center Column Vertical = true
    • Justify Columns = true

    The ribbon displayed correctly as you wanted when I tested it in Visual Studio. However, it did not display correctly initially. After starting the application, I had to change the style to any other style before the change would take effect. I think that's because of the tight coupling of the Workspace settings in the registry.