Aligning edit boxes on the Ribbon

  • Thread starter Thread starter xp
  • Start date Start date
X

xp

In the ribbon, when I set up two edit boxes, one above the other, they don't
line up because the text in the labels are different widths...it looks pretty
ugly...how can I get the edit boxes to line up correctly or perhaps right
align?

Thanks!
 
Hi xp

Try to set the width with

sizeString="WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW"
 
Hi Ron,

This will size the boxes themselves, which is half the battle, but the
labels are text and are still a problem. I can insert a blank space but the
spaces are sometimes too wide or too narrow to line things up; it looks
better, but is still a problem.

Please let me know if you learn any more or have any further ideas.

Thanks for the tip!
 
Hi XP

Sorry I have no time to play with it now
To busy with work and with examples for backstageview in 2010

I hope you get help from anybody else
 
Hi,

You could use a combination of Box, Label and Edit controls. Place the
labels within a vertically aligned box.
Then remove the labels from the edit controls. This xml will add a new group
to the Home tab with 2 labels and edit boxes.

<!--RibbonX Visual Designer 1.6 for Microsoft Excel. XML Code produced on
2009/11/18-->
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" >
<ribbon >
<tabs >
<tab idMso="TabHome" >
<group
id="Group1"
label="Group1">
<box
boxStyle="vertical"
id="Box1">
<labelControl
id="Labelcontrol1"
label="Short"/>
<labelControl
id="Labelcontrol2"
label="Long label text"/>
</box >
<editBox id="Editbox1" />
<editBox id="Editbox2" />
</group >
</tab >
</tabs >
</ribbon >
</customUI >

Cheers
Andy
 
I'll give this a try; thanks for the help!

Andy Pope said:
Hi,

You could use a combination of Box, Label and Edit controls. Place the
labels within a vertically aligned box.
Then remove the labels from the edit controls. This xml will add a new group
to the Home tab with 2 labels and edit boxes.

<!--RibbonX Visual Designer 1.6 for Microsoft Excel. XML Code produced on
2009/11/18-->
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" >
<ribbon >
<tabs >
<tab idMso="TabHome" >
<group
id="Group1"
label="Group1">
<box
boxStyle="vertical"
id="Box1">
<labelControl
id="Labelcontrol1"
label="Short"/>
<labelControl
id="Labelcontrol2"
label="Long label text"/>
</box >
<editBox id="Editbox1" />
<editBox id="Editbox2" />
</group >
</tab >
</tabs >
</ribbon >
</customUI >

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


.
 
Back
Top