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

Rad Panel expanded property Q1 2008

3 Answers 106 Views
Panelbar (obsolete as of Q2 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.
Andrew
Top achievements
Rank 1
Andrew asked on 11 Jul 2008, 02:31 PM
Hello,
I have recently purchased the latest winforms (Q1 2008) and am trying to programatically set the expanded property of the panel bar control.

I noticed a forum thread that suggested there was now a property called GroupExpanded, which i cannot see.

The fix for this involved removing any previous 2006 demo version and reibnstalling the q1 2007 version.

However I only see the Q1 2008 version in add remove programs so cannot do this ...

Any ideas?

3 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 14 Jul 2008, 01:12 PM
Hello Andrew,

Thank you for writing.

If you want to expand RadPanelBar item element in run-time you could use the code-block below:
 
((RadPanelBarGroupElement)this.radPanelBar1.Items[1]).Expanded = true

I hope this helps. If you have additional questions, do not hesitate to contact me again.
 

Kind regards,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Andrew
Top achievements
Rank 1
answered on 15 Jul 2008, 10:58 AM
Hi,

I'm actually trying to PREVENT the groups from being expanded by default on load!

The code I am using is:

Dim grp As RadPanelBarGroupElement = rpbMatch1.Items(x)
grp.Caption = dr.Item("MatchingHeading").ToString
grp.Expanded = False

But they still show up expanded.

Worse though is another problem I am unable to overcome.  Each of my panels is hosting a radlistbox.  There are three panels and, when all are expanded, I want the listboxes to all be visible on screen, with no scrollbar on the panel bar control (if the listboxes contain more entries than can show then each list bar gets a scroll bar). 

The listboxes have a fixed height of 60.  when the panels are expanded there is white space below each listbox eaven though I had preset the maximum size of the content panels to 63.  Is there a minimum height for the content panel (I tried creating an example to send you and, with teh panels set to a height 0f 90, it works as expected)
0
Martin Vasilev
Telerik team
answered on 17 Jul 2008, 10:50 AM
Hello Andrew,

Thank you for getting back to me:

In order to collapse all GroupElements you have to use only one of the following GroupStyle: ExplorerBarStyle or VisualStudio2005ToolBox. There is a known issue with the Expanded property of RadPanelBarGroupElement but you can workaround it by setting the property first to true and then to false.

You can manage the size of  ContentPanel by setting its MinimumSize.Height and MaximumSize.Height property. I have tested a scenario similar to the one you've described by adding RadListBox to each ContentPanels with docked state set to Fill.

Please review the code-block below as reference:
private void Form1_Load(object sender, EventArgs e) 
    this.radPanelBar2.GroupStyle = PanelBarStyles.ExplorerBarStyle; 
    //or 
    //this.radPanelBar2.GroupStyle = PanelBarStyles.VisualStudio2005ToolBox; 
 
    this.radPanelBarGroupElement1.ContentPanel.MinimumSize = new Size(0, 30); 
    this.radPanelBarGroupElement1.ContentPanel.MaximumSize = new Size(0, 30); 
 
    this.radPanelBarGroupElement2.ContentPanel.MinimumSize = new Size(0, 50); 
    this.radPanelBarGroupElement2.ContentPanel.MaximumSize = new Size(0, 50); 
 
    this.radPanelBarGroupElement3.ContentPanel.MinimumSize = new Size(0, 120); 
    this.radPanelBarGroupElement3.ContentPanel.MaximumSize = new Size(0, 120); 
 
    foreach(RadPanelBarGroupElement panel in this.radPanelBar2.Items) 
    { 
        panel.Expanded = true
        panel.Expanded = false
    } 

I hope this helps. If this does not exactly suite to your scenario, please send me an example project and  describe what you want to achieve. It will help me to understand your case and provide you with further assistance.

Best wishes,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Panelbar (obsolete as of Q2 2010)
Asked by
Andrew
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Andrew
Top achievements
Rank 1
Share this question
or