Ticket T989575
Visible to All Users

Checkbox alignment issues in ribbon groups

created 4 years ago

We've recently started working with ribbon controls, and have come across odd behaviour with checkbox alignment when they're added to ribbon groups (via TcxBarEditItem links).

This is illustrated in the attached project - to produce this we:

  1. Created a new VCL forms application.
  2. Added a Bar Manager then a Ribbon.
  3. Created a new "Group with Toolbar" for the default ribbon tab.
  4. Added a new checkbox to the group via the cxEditItem context submenu. This checkbox is left-aligned, and there doesn't seem to be any way of changing that including via the UseAlignmentwhenInplace option we've found mentioned in other tickets.
  5. Created a second "Group with Toolbar" on the default ribbon tab.
  6. Double-clicked the Bar Manager component to bring up its Customize dialog.
  7. Dragged the checkbox from that dialog's Commands tab into the second group, to create a second link to the same underlying control. The checkbox in this group is right-aligned, and again there doesn't seem to be any way of changing that.

This behaviour is consistent and reproducible for us; checkboxes created via the context menu are always left-aligned, while those subsequently connected via links created from the Customize dialog are always right-aligned. I've included a screenshot of what we get in the uploaded project, in case things appear differently for you.

Is there any way of forcing left-aligned checkboxes in all cases?

Thanks,
Ian

Answers approved by DevExpress Support

created 4 years ago

Hello Ian,

If you take a look at the DFM code of your project, you will see that Itemlinks in your project have slightly different settings. For example, one of them has the ViewLayout = ivlGlyphControlCaption option.

You can change the check box position using the following algorithm:

  1. Right-click the required CheckBox in a Ribbon;
  2. Choose the "Select Link" option in the context menu to select the corresponding ItemLink;
    dxScreen.png
  3. IDE's Object Inspector will show the selected ItemLink properties:
    dxScreen2.png
  4. Set the ViewLayout property to ivlGlyphControlCaption to show the check box on the left side.

This should help you work with ItemLinks and change their properties.

    Comments (2)

      Thanks Mikhail - we hadn't noticed the ViewLayout property, and changing it fixes things as you say.

      DevExpress Support Team 4 years ago

        You are always welcome!

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.