Buttons alignment

7 posts, 0 answers
  1. Hans
    Hans avatar
    49 posts
    Member since:
    Jul 2010

    Posted 29 Oct 2010 Link to this post

    Hi !

    I have a rad toolstrip with 3 butons, Save, Clear and Exit.
    I would like to align exit button at the end on the right side.

    Can I do this? How?

    Thank you !
    Hans
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 02 Nov 2010 Link to this post

    Hi, 

    Im fairly sure that the buttons cannot be right aligned, but you could always add a margin to the right most button to create the desired space. E.g. 

    Me.RadButtonElementExit.Margin.Left = value

    Hope that helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 02 Nov 2010 Link to this post

    Note, that there is also a new control that will replace this one soon called RadCommandBar. 

    You can find out more about the new release at this link

    Richard
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 03 Nov 2010 Link to this post

    Indeed, Hans, as Richards mentions, we have been working on a new control - RadCommandBar - that will  replace the existing RadToolstrip.

    The new control will provide this feature (which currently is not support by RadToolstrip.) and will also provide Visual Style Builder support, auto-collapse, and much better design-time support.

    Hope this helps.

    Greetings,
    Peter
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Francisco
    Francisco avatar
    17 posts
    Member since:
    Mar 2016

    Posted 24 Mar in reply to Peter Link to this post

    Hello,

      I am trying to accomplish the right alignment of a button like it was mentioned on this post using the CommandBarButton but I can't find the setting to do that.

    I am using Telerik version 2015.2.728.40

    Thanks

    Francisco

  7. Dess
    Admin
    Dess avatar
    1601 posts

    Posted 25 Mar Link to this post

    Hello Francisco,

    Thank you for writing.

    In order to achieve your requirement with right aligned CommandBarButton, please, have a look at the following code snippet:
    public Form1()
    {
        InitializeComponent();
        this.commandBarStripElement1.StretchHorizontally = true;
        this.commandBarButton1.StretchHorizontally = true;
        this.commandBarButton1.Alignment = ContentAlignment.MiddleRight;
        this.commandBarButton1.MaxSize = new Size(120, 0);
     
    }

    I hope this information helps. Should you have further questions I would be glad to help.
     
    Regards,
    Dess
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  8. Francisco
    Francisco avatar
    17 posts
    Member since:
    Mar 2016

    Posted 25 Mar in reply to Dess Link to this post

    Hello Dess,

      This works!

    Thanks

    - Francisco

Back to Top
UI for WinForms is Visual Studio 2017 Ready