PDA

View Full Version : Problem with chid items not re-appearing when calling setvisible on the parent



parky128
29 Oct 2014, 2:07 AM
Hi,

I have a bunch of fieldsets on a form panel that I am controlling the visibility of dynamically. Each of these contains a checkbox group with a varying number of checkboxes. I am also generating the checkboxes, checkbox groups and fieldsets dynamically when the containing panel is initially rendered, just in case this has any relevance!

When I call setVisible(true) on a previously hidden fieldset, the fieldset appears, but the checkboxes within do not.

When I inspect with Chrome debugger, I see the the containing div elements for the checkbox items have zero sized widths, and so as expected, when removing the widths the checkboxes then appear (see attached screenshot)

My initial thought was that I need to call doLayout on the fieldsets after calling setVisible, but then I thought that the checkboxgroups are the immediate parents that would manage the sizing of the checkboxes, so I have now tried calling doLayout on the checkboxgroups after calling setVisible on my fieldsets, but this has made no difference.

Can anyone out there advise me further please?

Thanks

slemmon
30 Oct 2014, 2:52 PM
Hi,

What version of ExtJS are you working with?
Also, it might be helpful if you can post a test case either here or at https://fiddle.sencha.com and we can then test along with you.