Opened 9 years ago

Closed 9 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)

index2.php (2.4 KB) - added by mark007 9 years ago.
functions2.js (564 bytes) - added by mark007 9 years ago.
style.css (515 bytes) - added by mark007 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by mark007

Attachment: index2.php added

Changed 9 years ago by mark007

Attachment: functions2.js added

Changed 9 years ago by mark007

Attachment: style.css added

comment:1 Changed 9 years ago by bill

Resolution: wontfix
Status: newclosed

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.

comment:2 Changed 9 years ago by mark007

Resolution: wontfix
Status: closedreopened

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 in reply to:  2 Changed 9 years ago by bill

Resolution: wontfix
Status: reopenedclosed

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.

Note: See TracTickets for help on using tickets.