I'm trying to position 5 buttons in a group:
2 vertically on the left, 2 vertically on the right, and one below.
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
|
|
0
|
|
|
|
Reply
|
Paul
|
12/21/2009 4:42:47 AM |
|
I forgot to post my code:
<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 >
|
|
0
|
|
|
|
Reply
|
Paul
|
12/21/2009 4:50:30 AM
|
|
Hi,
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" <melbournefilm@gmail.com> wrote in message
news:695fa620-6f06-48b9-8707-39d6c645b03d@j24g2000yqa.googlegroups.com...
> I'm trying to position 5 buttons in a group:
> 2 vertically on the left, 2 vertically on the right, and one below.
>
> 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
|
|
0
|
|
|
|
Reply
|
Andy
|
12/21/2009 1:37:14 PM
|
|
Thanks Andy, but that doesn't quite solve the problem. Or, it solves
one but creates another, because it spreads the width of the group by
inserted a middle column. Effectively, that XML creates 3 columns,
each 3 rows. What I want is 2 columns that are each 2 rows, with a
single row (but 2 columns wide) underneath in the third row.
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"/>
</box>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
|
|
0
|
|
|
|
Reply
|
Paul
|
12/23/2009 12:08:15 AM
|
|
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.
|
|
0
|
|
|
|
Reply
|
Paul
|
12/23/2009 12:40:04 AM
|
|
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" <melbournefilm@gmail.com> wrote in message
news:54b2aa43-f046-49ec-894e-213900f112c4@21g2000yqj.googlegroups.com...
> 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.
|
|
0
|
|
|
|
Reply
|
Andy
|
12/23/2009 9:03:02 AM
|
|
Thanks, Andy (and happy new year - I just got back from my holidays).
I think your suggestion might suit some who come looking for a similar
solution, but it's a bit messy for me because:
1). The padding can emulate left justification for the RHS buttons but
is fiddly
2). I wanted to group certain buttons together, which this doesn't do.
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
|
|
0
|
|
|
|
Reply
|
Paul
|
1/3/2010 11:31:18 PM
|
|
|
6 Replies
341 Views
(page loaded in 0.142 seconds)
Similiar Articles: Ribbon Split button control - microsoft.public.powerpoint ...... 2007 Ribbon (Add-In) - microsoft.public.access Ribbon Split button control ... of Excel Only - microsoft ... Ribbon Split button control ... Box + Check A Option Button ... Disable button on custom ribbon - microsoft.public.access ...... reply in the Search box of ... how can I disable a control in the ribbon at run time - microsoft ... Disable button on ... Enable or Disable custom Ribbon buttons in Excel 2007 ... Add custom button to existing group Excel 2007 - microsoft.public ...Add an ActiveX control; Excel 2007: Add a check box, option button, or ... I use the code ... Enable or Disable custom Ribbon buttons in Excel 2007 ... 10-Hide ‘Add ... Insert Ribbon mostly disabled - microsoft.public.excel.misc ...Using Office 2007 Pro w ... Text Box. Upon further review it appears the Insert ribbon has most of the buttons ... Kim, Use Excel Help (F1) and search for insert ribbon. Position Userform In Cells Portion of Excel Only - microsoft ...... the ribbon (2007 ... Position Userform In Cells Portion of Excel Only - microsoft ... userform in powerpoint - microsoft.public.powerpoint Ribbon Split button control ... How do I insert a radio button using Excel 2007? - microsoft ...Insert functions diabled in ribbon Excel 2007 Windows 7 Pro ... Excel 2003: Add an ActiveX control; Excel 2007: Add a check box, option button, or toggle button to a ... Word 2007 Forms - Plain Text Control does not accept unless you Ta ...... combination of Radio boxes, ActiveX Text Box controls, and Word 2007 Plain ... forms", select everything, click the Group button next to the content controls on the ribbon ... Insert functions diabled in ribbon Excel 2007 Windows 7 Pro ...... do I insert a radio button using Excel 2007 ... functions diabled in ribbon Excel 2007 Windows 7 Pro ... Why is my Equation button ... Insert Function dialog box in Excel 2007 ... RibbonX Controls and Determining Enabled? - microsoft.public.excel ...... built-in control you can use GetEnabledMso. Example for paste button. ... Box Controls in Access 2007 | eHow.com ... Office 2007 With Your Own Ribbon Tabs And Controls If you ... Why is the font tab missing from Format Control box? - microsoft ...... Control box? - microsoft ... I'm trying to set up option buttons in my excel ... box? - microsoft ..... Ribbon ... Control box? - microsoft ... If you are using an Option button ... Answer : Ribbon in Excel 2007: positioning buttons using box controlsRibbon in Excel 2007: positioning buttons using box controls - answer - I'm trying to position 5 buttons in a group: 2 vertically on the left, 2 vertically on the ... Adding Custom DialogBoxLauncher Controls to the 2007 Office Fluent ...... button to the default Office Fluent Ribbon in Office Excel 2007. This demonstrates how to use a dialogBoxLauncher control ... box, select XML File. Name the new file Ribbon ... How to Add ActiveX Control in Excel 2007 | eHow.comHow to Add ActiveX Control in Excel 2007. When you are ... Click on the “Excel Options” button and then click on the box next to the “Show Developer tab in the Ribbon ... How to Create a Button in Excel 2007 | eHow.com... Excel 2007 Ribbon; How to Create a Check Box in ... Use Radio Buttons in Excel. A radio button, sometimes called an option button, is a circular control similar to a check box. Creating Custom Ribbon Galleries in Excel 2007... in Excel 2007: a gallery of labels, and a gallery of images. These samples use XML to create a custom tab on the Ribbon with a Gallery control ... the button control ... box. 7/26/2012 2:44:26 AM
|