Opened 11 years ago
Closed 11 years ago
#10451 closed defect (wontfix)
Updating button label, doesn't resize ContentPane
Reported by: | mark007 | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Dijit | Version: | 1.4.0b |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Hi,
I notice, if I have a textless button within content pane, if I update the label of that button programatically, surround ContentPanes? don't seem to adjust themselves.
Page below shows this in bottom left of the page. The button is labelled on page load. Only when manually dragging the splitter to the right of the button, does the content pane above the button adjust adn display correct. Initially, the bottom of this content pane is hidden behind the one that contains the button.
It happens for me in Chrome 4 and Firefox 3.5, not IE7.
Attachments (3)
Change History (6)
Changed 11 years ago by
Attachment: | index2.php added |
---|
Changed 11 years ago by
Attachment: | functions2.js added |
---|
Changed 11 years ago by
comment:1 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 follow-up: 3 Changed 11 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
Thanks for the reply. A border container resize works but I have to resize the border container above the button, not the one that contains the button itself.
So to change the attribute of a button, I potentially have to resize every border container on a page...... I thought without a size a bordercontainer should size to fit its contents?
Obviously close if you still feel this isn't an issue that should be fixed by dojo. Just seems like alot of work needs to be done by the user just to do something like changing a label attribute of a button....
comment:3 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Replying to mark007:
Thanks for the reply. A border container resize works but I have to resize the border container above the button, not the one that contains the button itself.
I don't know what that means... you call resize() on the BorderContainer that contains the ContentPane that contains the button.
So to change the attribute of a button, I potentially have to resize every border container on a page......
No, you just call resize() on the BorderContainer that contains the ContentPane that contains the button.
I thought without a size a bordercontainer should size to fit its contents?
No, not at all. You need to specify a size on every BorderContainer, unless it is parented by another layout widget.
It sounds like you are getting confused between BorderContainer and ContentPane. If you initialize a BorderContainer passing in a ContentPane with no size set, then the BorderContainer queries the size of the ContentPane, *but* it doesn't handle changes to the size of the ContentPane.
Since the ContentPane has no explicit size specified, by modifying the button you are changing the size of the pane... and BorderContainer doesn't support panes that change size.
You need to set a specific size on each pane (except the center pane), or at least call BorderContainer.resize() when one of the panes changes size.