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

RadWaitingBar in RadStatusStrip issues...

3 Answers 166 Views
WaitingBar
This is a migrated thread and some comments may be shown as answers.
Jess Askey
Top achievements
Rank 1
Jess Askey asked on 28 Dec 2009, 08:55 PM
Hello...

I am attempting to get a RadWaitingBar to work in a RadStatusStrip and having some issues...  my status strip is build like this...

RadWaitingBar (200px) |  RadLabelElement (Spring) | RadLabelElement (200px)

I found the article of putting the RadWaitingBar in a RadHostItem at...

http://www.telerik.com/community/forums/winforms/statusstrip/radwaitingbar-in-radstatusstrip.aspx

and followed the instructions but still the center LabelElement is over-springing all the way to the left underneath the RadHost + RadWaitingBar...

I am building this entirely in code due to the RadHostItem...

private RadWaitingBar waitingBar = new RadWaitingBar(); 
private RadLabelElement _statusLabelElementCenter= new RadLabelElement(); 
private RadLabelElement _statusLabelElementRight= new RadLabelElement(); 
 
waitingBar.BeginInit();  
waitingBar.Size = new Size(200, 16);  
waitingBar.MinimumSize = new Size(200, 16);   
waitingBar.MaximumSize = new Size(200, 16); 
waitingBar.EndInit(); 
 
statusLabelElementCenter.AutoSize = true
statusLabelElementCenter.Margin = new System.Windows.Forms.Padding(1); 
statusLabelElementCenter.Text = "Here is some really long text that shows how the controls are overlapped."
 
statusLabelElementRight.AutoSize = false
statusLabelElementRight.Size = new Size(200, 16); 
statusLabelElementRight.Margin = new System.Windows.Forms.Padding(1); 
statusLabelElementRight.Text = "Right Label"
 
//WaitingBar in RadHostItem, RadHostItem in PanelElement, based 
//upon suggestions in previous post. 
RadStatusBarPanelElement stripPanel = new RadStatusBarPanelElement(); 
stripPanel.Size = new Size(200, 16); 
stripPanel.Padding = new Padding(0); 
stripPanel.Children.Add(new RadHostItem(waitingBar)); 
 
radStatusStrip1.BeginInit(); 
radStatusStrip1.Items.Add(stripPanel); 
radStatusStrip1.Items.Add(statusLabelElementCenter); 
radStatusStrip1.Items.Add(statusLabelElementRight); 
radStatusStrip1.SetSpring(statusLabelElementCenter, true); 
radStatusStrip1.EndInit(); 




when I run this... I get the following (attached image).... as you can see, the RadWaitingBar is on top of the center LabelElement.

Any ideas on how to fix this?

3 Answers, 1 is accepted

Sort by
0
Jess Askey
Top achievements
Rank 1
answered on 28 Dec 2009, 09:24 PM
Okay, I seem to have solved this one myself...

a few issues...

  1. I had not set the size of the PanelElement or set the AutoSize to false. (this was the main issue)
  2. The PanelItem was not actually needed in the end. Adding the RadHostItem directly to the StatusStrip was fine. I had to set the size of the RadHostItem and also set Autosize = false as I did for the PanelElement.

0
Dave
Top achievements
Rank 1
answered on 02 Jul 2013, 11:02 AM
I still feel this is a bug - for the reason that one cannot handle the item when the container is marked to spring to available size.
0
Stefan
Telerik team
answered on 05 Jul 2013, 08:56 AM
Hi Dave,

Thank you for writing.

Could you please provide me with more details on the scenario you consider a bug. Also code snippets that help reproduce the issue might be helpful.

Thank you in advance for your time and cooperation.
 

Regards,
Stefan
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
WaitingBar
Asked by
Jess Askey
Top achievements
Rank 1
Answers by
Jess Askey
Top achievements
Rank 1
Dave
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or