The code below places the last button on the far right and I'm
wondering what I can do to fix this. I realise that I can set the
boxStyle to horizontal and rearrange the buttons, but I'm trying to
keep them grouped in a logical fashion as above. If all else fails, I
will revert to this, but I would have thought there'd be a solution.
Any suggestions appreciated.
Thanks in advance
Paul Martin
Melbourne, Australia
<group id="Import" label="Import">
<box boxStyle="vertical" id="box1">
<button id="buttonL1" label="Left Top" onAction="DoSomething"/>
<button id="buttonL2" label="Left Middle" onAction="DoSomething"/>
</box>
<box boxStyle="vertical" id="box2" >
<button id="buttonR1" label="Right Top" onAction="DoSomethingy"/>
<button id="buttonR2" label="Right Middle" onAction="DoSomething"/>
</box>
<button id="buttonB" label="Bottom" onAction="DoSomething"/>
</group >
This forces the middle button to the third row. Remove label items if you
want to raise the middle button.
<!--RibbonX Visual Designer 1.7 for Microsoft Excel. XML Code produced on
2009/12/21-->
<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">
<button
id="Button1"
label="Top Left"/>
<button
id="Button2"
label="Bottom Left"/>
<box
boxStyle="vertical"
id="Box2">
<labelControl
id="Labelcontrol1"
label="Labelcontrol1"
showLabel="false"/>
<labelControl
id="Labelcontrol2"
label="Labelcontrol2"
showLabel="false"/>
<button
id="Button3"
label="Middle"/>
</box >
<box
boxStyle="vertical"
id="Box3">
<button
id="Button4"
label="Top Right"/>
<button
id="Button5"
label="Bottom Right"/>
</box >
</box >
</group >
</tab >
</tabs >
</ribbon >
</customUI >
Cheers
Andy
--
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Paul Martin" <melbou...@gmail.com> wrote in message
news:695fa620-6f06-48b9...@j24g2000yqa.googlegroups.com...
You did get me thinking about boxes and I thought the code below would
solve the problem, but it doesn't. It still places the final button
into a third column. What this code attempts is to put the two
vertical boxes into a horizontal box, with a button below that (and
putting the button into a box does nothing, as you'd expect).
Any other suggestions?
Paul
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui">
<ribbon>
<tabs>
<tab idMso="TabHome">
<group id="grp1" label="Test">
<box boxStyle="vertical" id="box1">
<box id="box2">
<box boxStyle="vertical" id="box3">
<button id="btn1" label="Top L"/>
<button id="btn2" label="Mid L"/>
</box>
<box boxStyle="vertical" id="box4">
<button id="btn3" label="Top R"/>
<button id="btn4" label="Mid R"/>
</box>
</box>
<button id="btn5" label="Bottom"/>
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.
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" <melbou...@gmail.com> wrote in message
news:54b2aa43-f046-49ec...@21g2000yqj.googlegroups.com...
In the end, it's easier just to add the buttons without any boxes so
that the first two are vertically adjacent, the bottom button is below
that and then the next two buttons are automatically in the next
column, also vertically adjacent. It seems a pity that there's not
better control over the placement of the buttons.
Thanks again
Paul