statusbar elements rightside alignment

1 Answer 129 Views
StatusStrip
Naresh
Top achievements
Rank 1
Iron
Naresh asked on 13 Apr 2022, 04:18 PM

statusbar  elements rightside alignment

exepectation

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 18 Apr 2022, 07:32 AM

Hello Nani,

Thank you for the provided images.

To move the elements to the right you can set the Spring property of the elements. For example, if you set this property to true to the first element, all elements afterward will be set to the right. However, if you set this property to the last element, it will be stretched to take all available space. The following code snippet demonstrates how to move all elements after the first one to the right. 

private void Form1_Load(object sender, EventArgs e)
{
    RadLabelElement labelElement = new RadLabelElement();
    labelElement.Text = "My LabelElement";
    RadButtonElement buttonElement = new RadButtonElement();
    buttonElement.Text = "My ButtonElement";
    RadRepeatButtonElement repeatButtonElement = new RadRepeatButtonElement();
    repeatButtonElement.Text = "My Repeat button";
    CommandBarSeparator separator = new CommandBarSeparator();      
    RadProgressBarElement progressBarElement = new RadProgressBarElement();            
    progressBarElement.Text = "My Progress Bar";
    radStatusStrip1.Items.AddRange(new RadItem[] { labelElement, buttonElement, repeatButtonElement, separator, progressBarElement });

    // Setting the Spring of the first element to true.
    this.radStatusStrip1.SetSpring(labelElement, true) ;
}

I hope this approach will work for you.

Regards,
Dinko
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
StatusStrip
Asked by
Naresh
Top achievements
Rank 1
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or