Adding RadProgressBar runtime fails

2 posts, 0 answers
  1. Benny
    Benny avatar
    2 posts
    Member since:
    Aug 2012

    Posted 10 Sep 2012 Link to this post

    Hi Telerik forum.

    I'm trying to add a number of RadProgressBars to another control like a RadGroupBox or a RadPageViewPage.

    The RadProgressBar is actually added, but is not visible! I then tried to set .Visible = true and .BringToFront() but no luck;

    In pasted code I'm trying to load a RadGroupBox, and a loop of the RadGroupBox's controls show that they are actually added but yet invisible. Only if I set the .Dock = DockStyle.Fill it will show up.
    The groupbox is big enough to contain the 2 expected radprogressbar items

    The OrderList contains 2 Orders. 
    What have I missed here?  By using a microsoft groupbox + microsoft progressbar is works, but for this radcontrol is seems not to work

    grpActiveOrders.Controls.Clear();
     
          RadProgressBar pgb;
          int h = 20;
          foreach (Order order in OrderList)
          {
              //Add progressbar runtime and load with order status data
              pgb = new RadProgressBar();
              pgb.Text = order.RecipeName.Trim();
              pgb.Maximum = order.OrderBatchTotal;
              pgb.Value1 = order.OrderCalcultatedStatus;
              pgb.Width = 195;
              pgb.Left = 10;
              pgb.Top = h;
              grpActiveOrders.Controls.Add(pgb);
     
              h += 40;
          }

  2. Benny
    Benny avatar
    2 posts
    Member since:
    Aug 2012

    Posted 10 Sep 2012 Link to this post

    Found the solution:
    The Height must be set!  .Height = 20;
    The microsoft  progressbar has a default height and width, but RadProgressBar must have these properties set
    Sorry for inconvinience!

  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top