Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#4031 closed defect (fixed)

TabContainer - Calling setLabel on controlButton of tab fails

Reported by: guest Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


Trying to set the tab's label from code fails due to the fact that containerNode is not defined for a dijit.layout._TabButton.

Adding the following code to test_TabContainer.html shows the error

	dijit.byId("tab1").controlButton.setLabel("Updated Title");

The controlButton is a dijit.form.Button in the end and the setLabel function uses this.containerNode. So the quick answer is to add that as an additional dojoAttachPoint in the template string for the dijit.layout._TabButton.

Patch attached.


Attachments (1)

TabContainer.patch (808 bytes) - added by guest 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by guest

Attachment: TabContainer.patch added

comment:1 Changed 14 years ago by bill

Resolution: fixed
Status: newclosed

(In [9997]) Fix setLabel() on a tab button (although eventually we should have a way to change the title of the actual pane and have the info reflected to all controllers maybe? Not sure. Changing label directly is not officially supported.) Fixes #4031.

comment:2 Changed 14 years ago by bill

PS: note that the above technique is not recommended... changing the label will make the tab shorter or longer which (in exceptional cases) could change the tabs from taking up one row to two rows, or vice-versa, but the TabContainer? won't know to reformat itself.

Note: See TracTickets for help on using tickets.