This is a migrated thread and some comments may be shown as answers.

Buttons alignment

6 Answers 183 Views
Toolstrip (obsolete as of Q3 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hans
Top achievements
Rank 1
Hans asked on 29 Oct 2010, 06:59 PM
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

6 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 02 Nov 2010, 04:42 PM
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
0
Richard Slade
Top achievements
Rank 2
answered on 02 Nov 2010, 04:44 PM
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
0
Peter
Telerik team
answered on 03 Nov 2010, 07:28 PM
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
0
Francisco
Top achievements
Rank 1
answered on 24 Mar 2016, 03:50 PM

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

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 25 Mar 2016, 11:48 AM
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.
0
Francisco
Top achievements
Rank 1
answered on 25 Mar 2016, 04:37 PM

Hello Dess,

  This works!

Thanks

- Francisco

Tags
Toolstrip (obsolete as of Q3 2010)
Asked by
Hans
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Peter
Telerik team
Francisco
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or