View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default Ribbon in Excel 2007: positioning buttons using box controls

Try this, still a work around.

3 horizontal boxes within a vertical box.
Rather than padding the buttons with leading spaces I used a label control
to pad the area between the buttons for the top and middle section.
For the Bottom section the labels pad around the button to center it.

<!--RibbonX Visual Designer 1.7 for Microsoft Excel. XML Code produced on
2009/12/23--
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
<ribbon
<tabs
<tab
id="Tab1"
label="Tab1"
<group
id="Group1"
label="Group1"
<box
boxStyle="vertical"
id="Box1a"
<box
boxStyle="horizontal"
id="Box2a"
<button
id="Button1"
label="Top Left"/
<labelControl
id="Labelcontrol1"
label=" "/
<button
id="Button2"
label="Top Right"/
</box
<box
boxStyle="horizontal"
id="Box3a"
<button
id="Button3"
label="Middle Left"/
<labelControl
id="Labelcontrol2"
label=" "/
<button
id="Button4"
label="Middle Right"/
</box
<box
boxStyle="horizontal"
id="Box4a"
<labelControl
id="Labelcontrol3"
label=" "/
<button
id="Button5"
label="Button Across Bottom "/
<labelControl
id="Labelcontrol4"
label=" "/
</box
</box
</group
</tab
</tabs
</ribbon
</customUI

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Paul Martin" wrote in message
...
As an aside, I've been playing around with Button Groups and Buttons.
Inserting 3 Button Groups "sort of" addresses the problem by placing
the buttons in roughly the configuration I'm after. But there's two
drawbacks:
1). The RHS buttons on the top and middle rows are not left justified.
2). The buttons appear with the button image.

1) could be fixed by buffering the LHS with spaces. Not ideal, but it
would do the trick.
2) doesn't seem to have any workaround.

All-in-all, this is not an adequate solution, so... I'm still looking.