Ticket #5960 (reopened task)
add DropDownButton.setDropDown() method
| Reported by: | guest | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4 |
| Component: | Dijit | Version: | 1.0 |
| Severity: | normal | Keywords: | |
| Cc: | alex, paulprincewv@… |
Description (last modified by bill) (diff)
Tested in version 1.0.1. This bug is reproducable.
Given:
var toolbar = new dijit.Toolbar();
var button = new dijit.form.DropDownButton({ label: 'Button Label' });
var menu = new dijit.Menu();
var menuitem = new dijit.MenuItem({ label: 'Menu Item' });
It should be possible to create an desktop-application-like menubar like so:
toolbar.addChild( button ); button.addChild( menu ); menu.addChild( menuitem );
But this does not work.
Instead of calling button.addChild(), you must directly set button's .dropDown property like so:
button.dropDown = menu;
This appears to be a defect.
If DropDownButton.addChild() is inappropriate for this action, perhaps DropDownButton.addDropDown() would be correct.
Bug filed by teatime <paulprincewv@…> at the request of slightlyoff from irc://irc.freenode.net/#dojo
Change History
Note: See
TracTickets for help on using
tickets.