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

CollapsiblePanelContentSizingMode and restoring contained controls height not working as expected

9 Answers 293 Views
CollapsiblePanel
This is a migrated thread and some comments may be shown as answers.
Czeshirecat
Top achievements
Rank 2
Iron
Iron
Czeshirecat asked on 10 Jul 2017, 10:27 AM

I've a RadCollapsiblePanel that contains a radpanel (dockstyle.left) plus a  radsplitcontainer (dockstyle.fill).

The radcollapsiblepanel sizing mode is set to .FitToContentHeight.

It collapses ok, but when it expands it seems to resize to the content height correctly but the contents aren't being restored with it. See attached file.

I've tried resetting the contained splitcontainer dock to botton, then fill, but that made no difference.

9 Answers, 1 is accepted

Sort by
0
Czeshirecat
Top achievements
Rank 2
Iron
Iron
answered on 10 Jul 2017, 12:18 PM

Oh. Ive realised what was going wrong. The collapsible panel was resizing itself to the original size, but that was happening after the dockstyle.fill event was firing on the splitcontainer child control. So that was resizing to 2 pixels high (tbh, that should have received a resize to force it to fill the space).

Ive changed the dockstyle of the splitcontainer to dockstyle.top which prevents it changing the height. Im just hoping that the theming doesn't lose child controls from the splitcontainer when they're resized by theming. (I feel really sorry for you telerik devs. Oh my!)

 

0
Dimitar
Telerik team
answered on 11 Jul 2017, 06:38 AM
Hello Claire,

I am glad that you have found a solution for this case. As to the themes at hand, please note that they do not change the size of the controls (except the touch themes).  

Do not hesitate to contact us if you have other questions.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Nidal
Top achievements
Rank 1
answered on 25 Apr 2019, 01:57 PM
Dear dimitar I have issue with radcollapsiblepanel  I unchecked the auto size of button and set the size manually when I run the my app the button disabled also for another radcollapsiblepanel  elements 
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Apr 2019, 10:56 AM
Hello, Nidal,    

According to the provided information, I suppose that you want to control the size of the collapsible button but after disabling the auto-size functionality, the button disappears. The AutoSize property is serialized in the designer file. However, the specified size is not.

The possible solution that I can suggest is to specify the size at run time as follows:  

public RadForm1()
{
    InitializeComponent();
 
    this.radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.HeaderButtonElement.AutoSize = false;
    this.radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.HeaderButtonElement.Size = new Size(30, 30);
}

However, if it is not the exact requirement, please give us some more details about the exact goal that you are trying to achieve. Thus, we would be able to think about a suitable solution and assist you further. Thank you in advance. 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Nidal
Top achievements
Rank 1
answered on 27 Apr 2019, 04:54 PM
Thank you dear for your response , what I try to make it by collapsible panel in the free trail is the following panel(demo1   picture) could you help to make the collapsiablepanelheader element look like in the picture . regards 
0
Nidal
Top achievements
Rank 1
answered on 28 Apr 2019, 05:50 AM

 

In the following try I put the size for radimagebutton but it look like in image1

RadImageButtonElement btnimage = new RadImageButtonElement

            {
                Image =newImage,
                Size=new Size(20,20)
               
            };
          
radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.Children.Insert(0, btnimage);

0
Nidal
Top achievements
Rank 1
answered on 28 Apr 2019, 06:13 AM
I solved it by setting the auto size to false thank you
0
Nidal
Top achievements
Rank 1
answered on 28 Apr 2019, 09:39 AM
When I close the collapsible panel the background color still for a second and then goes  , How I can solve this 
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 29 Apr 2019, 08:48 AM
Hello, Nidal,     

I am glad that the initial problem that you were facing is now resolved. I have noticed that you have posted identical questions in multiple forum threads.We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding.

As to the question about closing the collapsible panel and the background color still stays for a second, I would suggest you to disable the animation. It is just necessary to set the RadCollapsiblePanel.EnableAnimation property to false.

I hope this information helps. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
CollapsiblePanel
Asked by
Czeshirecat
Top achievements
Rank 2
Iron
Iron
Answers by
Czeshirecat
Top achievements
Rank 2
Iron
Iron
Dimitar
Telerik team
Nidal
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or