Hello all,
Menu
Editable grid with a popup menu for each row on right mouse click
- Login or register to post comments
- Read more
- Subscribe post
DropDownButton menus and scrolling
I have a rather large DropDownButton menu, which at 1024x768 extends the full height of the screen. However, the items above and below the screen can't be reached without scrolling the entire screen. I seem to recall menus being scrollable, so they reach a particular height and then scroll. Is there some way to force this? I tried setting the actual dijit.Menu object to have a height of 80% and overflow:scroll, but it didn't help.
How can I retrieve the element ID from an event object?
(I figured this question had more to do with the Dojo event system rather than the Menu widget, so I'm posting it here, but if I should be asking this to the Dijit forum, please advise.)
I'm using a context menu to let users manipulate the selected element. For that, I'm using the event system by referring to Event Object section of the Book of Dojo.
FYI -- How to cleanly destroy a dijit.Menu in Dojo 1.0.x
In case any others out there are being plagued by the dijit.Menu bug where it won't cleanly destroy itself -- this is a work around until they get it fixed.
Do the following after a menu closes (by attaching to "onClose" event of the menu)
dijit.byId( '/*id of menu*/' ).destroy(); //removes dijit registry entry for menu itself
//finds the orphaned menus on the body dom node and deletes the widgets.
dojo.forEach( dojo.query( ".dijitMenuTable" ).map(dijit.byNode), function( widget ){ widget.destroy(); } );
- Login or register to post comments
- Read more
- Subscribe post
Method for closing Menu on DropDownButton
I'm looking for a method for closing a Menu on a DropDownButton. I have conditions in my page that enable/disable the DropDownButton. If the Menu is open and the conditions change to disable the DropDownButton, the menu seems to be stuck and can't be referenced, even if the DropDownButton is enabled again. I'd like a way to close the menu before I disable the DropDownButton, but can't find one in the code or docs.
Any help is appreciated.
- Login or register to post comments
- Unsubscribe post
Editor Context Menu
I would like to create a context menu and eventually add other widgets to the Editor iframe. I have the following code which properly creates a context menu anywhere on the page that I want. How do I do that for the iframe?
// create a new editor
editor = new dijit.Editor({
jsID: 'editor'
}, dojo.byId(strId));
// create context menu
menu = new dijit.Menu({
contextMenuForWindow : true,
style:"display: none;",
id : "Secondsubmenu1"
}, dojo.byId('???? Which ID goes here????')); // ???? What is the ID of the iframe editor window?
